Hello ATF team,
Recently, Genuitec related MyEclipse 6.0 which includes a subset of the
ATF project, specifically version 0.2.2 (v20070703100). During our dev
cycle we made some changes to the ATF plugins to allow for better
integration and adoption into MyEclipse. Because of our tight delivery
timeline we decided to focus on making the exact changes we needed to
the ATF plugins, and then sometime soon after that release we would
followup with the ATF team to discuss our changes and get some
feedback. So I'm posting a summary our changes that we made to the ATF
plugins for our latest release.
>From the ATF team I'd like to get feedback on the patches I've
submitted and possible start a conversation about opening up portions
of the codebase for more extensibility. Also, I'm looking for advice
from the team on how we could our usage of ATF plugins so we could
better accomplish our objectives if some of our changes made in our
patchset are not really required. I've made just the patches that we made to ATF to make it more extensible available in a zip file that can be downloaded here:
http://downloads.myeclipseide.com/downloads/products/eworkbench/public-src/atf_v0.2.2_patches.zipIn the referenced zip file, there are 6 patch files that were diffed against ATF 0.2.2 release
or (v200707031000). I'd like to summarize the changes made in each
patch file to help your team better understand our reasons behind the
change.
Patch file: 01.web_launch_configuration_patches.txt
- WebLaunchConfigurationTab.java
- Changed 3 buttons and DebugPreferencesGroup from private to
protected so they could be accessed from our subclass
- Added boolean field "showServerOption" so in our subclass we
could turn off the display of the "Load from Server" button
- Modified to UI creation to respect the new "showServerOption"
boolean field
- Added protected method "createFileSelectionDialog". This
allows us to override in a subclass and provide MyEclipse specific
Project file selection dialog
- Added protected method "getWebContentRelativePath". This
allows us to override in a subclass and provide MyEclipse specific
lookup into MyEclipse webprojects
- WebLaunchConfigurationDelegate.java - dded protected method
"createDebugJobForURL(url)". This
allows us to provide a subclass that overrides this method and creates
a MyEclipse subclass of MozillaDebugJob instead of the normal
MozillaDebugJob.
- WebLaunchShortcut.java - Added protected method
"launchConfiguration(...)" so that in
a subclass we could add some MyEclipse specific runtime checks before
we actually launch the configuration.
- DebugPreferencesGroup.java - Added a public method
"setEnabled(boolean)". For our
WebLaunchConfigurationTab subclass we have conditions where we need to
disable all controls on the UI.
Patch file: 02.debug_patches.txt
- MozillaDebugJob.java
- Added new constructor so that subclasses can be created that
has less parameters
- Added protected method "getDebugBrowser". This method allows
us to provide a MozillaBrowser that may already be running
- MozillaDebugPlugin.java - Added null check for appPath because in
some MyEclipse
configurations appPath can be null and it seems that it will work just
fine even when appPath is null.
- MozillaDebugUIPlugin.java
- Added static method "setJSDebugViews" which allows us to set
MyEclipse views to be apart of the JSDEBUGVIEWS array which is used for
to open debug related views on various events.
- Enhanced a for loop that goes through open editors in the
workbench to close MozillaBrowserEditor. The enhanced for loop will go
through multiple workbenches instead of just the active workbench. In
MyEclipse sometimes the Mozilla Browser Editor may be open in a 2nd
workbench.
- plugin.xml
- Had to comment out the debugMozillaPresentation declaration
so we could redeclare it in our plugin. We needed to provide a
subclass of the MozillaDebugModelPresentation class. We needed to
create our own subclass of the sourceDisplayUtil field. Our
sourceDisplayUtil subclass does some MyEclipse specific actions.
- JSDebugThread.java
- Added support for scriptListeners to the JSDebugThread. In
MyEclipse we needed to be notified when scripts were created or
destroyed so we added this into the JSDebugThread class.
- Added IScriptListener interface that is used in the
JSDebugThread class.
- JSDebugTarget.java
- Added a call to a new static class JSDebugTargetUtil, which
only has one method to create the JSDebugThread. We needed a way to
provide a way that our own subclass of JSDebugThread would be used
instead. In our subclass we sometimes want to display things a little
different in the scripts view.
- Added 2 null checks for debuggerService field. In our
internal tests we were running into some cases where the
debuggerService was null, so we added the checks.
- JSDebugTargetUtil.java - This is a new static class that was
created so we could
override and create our own subclass of JSDebugThread.
Patch file: 03.source_lookup_patches.txt
- JSSourceLocator.java - Added protected method "findLocalResource"
that we can
override in our own subclass of JSSourceLocator. We needed to add some
MyEclipse specific resources lookup to this method.
- SourceDisplayUtil.java - Added protected method
"createStorageEditorInput" so that in
our own subclass we could create a StorageEditorInput that would be
specific to the MyEclipse browser editor.
- SourceLocatorUtil.java
- Added static method to set the instance of the
SourceLocatorUtil. This way we could provide our own subclass instance
of a SourceLocatorUtil that overrides several methods for finding
resources.
- Also we needed to provide our own Subclass for the URLStorage
inner class which has MyEclipse specific options.
- JSDebugScriptElementSourceDisplayAdapter.java
- Made sourceLookupJob field protected so it can be set from
subclass
- Added public method to inner class SourceLookupJob to allow
setting of the sourceDisplayUtil field externally. We set this to an
instance of our own subclass of the sourceDisplayUtil to do MyEclipse
specific tasks
- Made sourceDisplayJob field protected to so it can be set
from subclass
- Added public method to inner class SoureDisplayJob to allow
setting of the sourceDisplayUtil field externally. We set this to an
instance of our own subclass of the sourceDisplayUtil to do MyEclipse
specific tasks.
- DebuggerSourceDisplayUtil.java - Added protected method
"createURLStorage" to that we can
create our own subclass of the URLStorage class that does MyEclipse
specific tasks.
Patch file: 04.mozilla_browser_editor_patches.txt
- MozBrowserEditor.java
- Added protected method "createNavigationBar" so that we could
override this method in our own subclass of MozBrowserEditor that will
create another subclass of NavigationBar.
- Added 2 protected methods: "addMenuExtensionActions" and
"addExtensionActions" so that we could override this methed in our own
subclass of MozBrowserEditor. In our subclass we add some additional
actions to the toolbar.
- Added protected method "performGoAction". This method we
override in our subclass of MozBrowserEditor to do some MyEclipse
specific tasks just prior to executing the real GO action.
- NavigationBar.java
- Made location field more generalized and protected so it
could be accessed in our subclass.
- Added protected method "createlocationControl" that we could
override in our subclass to add a MyEclipse specific feature.
- PopupWindowBrowserListener.java - Changed the declaration
modifier for the class from default
to public so that we could create a subclass. In our subclass we need
to create a MyEclipse specific subclass of the MozBrowserEditor for
popups.
Patch file: 05.views_patches.txt
- ScriptView.java - Added protected method
"getViewUnavailableMessage". This way
we can provide our own message that is display in the script view
whenever the view is inactive.
- _javascript_ConsolePage.java - Added protected method
"createMessageFilter" that allows us
to override that method in a subclass. In our subclass we create our
own subclass of ConsoleMessageFilter that filters some MyEclipse
specific messages that were appearing in the _javascript_ console.
Patch file: 06.manifest_patches.txt
- This patch contains some changes we had to make in order to
open up access to some internal classes.
- Also, there are a few places that we made dependencies to
org.eclipse.atf.core optional because we didn't include this plugin in
our MyEclipse IDE.
If anyone is having trouble seeing the patches as attachements let me
know and I can make them available another way.
I'd like to hear some feedback from the ATF team on these changes. If
there are some changes that do make sense for the ATF team to adopt let
me know and I can enter bugzilla reports that request a specific API or
extension enhancement. But I'd like to get some direction from the ATF
team before I just go opening bug reports that don't make sense. You
can either reply to the mailing list or if anyone wants to contact me
directly to continue a discussion anything off of the newgroup my
contact info is: greg_at_genuitec_dot_com
Thanks for your reply in advanced.
Best regards,
Greg Amerson
Genuitec