Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 59496 Details for
Bug 173457
[Actions] Convert Team action set to new menu support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Next version of the patch (proposition)
patch_173457_20070221.txt (text/plain), 47.59 KB, created by
Tomasz Zarna
on 2007-02-21 12:09:46 EST
(
hide
)
Description:
Next version of the patch (proposition)
Filename:
MIME Type:
Creator:
Tomasz Zarna
Created:
2007-02-21 12:09:46 EST
Size:
47.59 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.team.examples.filesystem >Index: src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java,v >retrieving revision 1.1 >diff -u -r1.1 SynchronizeAction.java >--- src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java 21 Feb 2007 22:24:12 -0000 1.1 >+++ src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java 22 Feb 2007 00:07:02 -0000 >@@ -10,6 +10,8 @@ > *******************************************************************************/ > package org.eclipse.team.examples.filesystem.ui; > >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; > import org.eclipse.core.resources.mapping.ResourceMapping; > import org.eclipse.jface.action.IAction; > import org.eclipse.team.core.subscribers.SubscriberScopeManager; >@@ -38,4 +40,9 @@ > participant.run(getTargetPart()); > } > >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ // TODO Auto-generated method stub >+ return null; >+ } >+ > } >Index: src/org/eclipse/team/examples/filesystem/ui/PutAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java,v >retrieving revision 1.1 >diff -u -r1.1 PutAction.java >--- src/org/eclipse/team/examples/filesystem/ui/PutAction.java 21 Feb 2007 22:24:12 -0000 1.1 >+++ src/org/eclipse/team/examples/filesystem/ui/PutAction.java 22 Feb 2007 00:07:02 -0000 >@@ -12,6 +12,8 @@ > > import java.lang.reflect.InvocationTargetException; > >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; > import org.eclipse.jface.action.IAction; > import org.eclipse.team.examples.filesystem.Policy; > >@@ -43,4 +45,9 @@ > protected boolean isOverrideIncoming() { > return false; > } >+ >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ // TODO Auto-generated method stub >+ return null; >+ } > } >Index: src/org/eclipse/team/examples/filesystem/ui/FileSystemAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemAction.java,v >retrieving revision 1.1 >diff -u -r1.1 FileSystemAction.java >--- src/org/eclipse/team/examples/filesystem/ui/FileSystemAction.java 21 Feb 2007 22:24:12 -0000 1.1 >+++ src/org/eclipse/team/examples/filesystem/ui/FileSystemAction.java 22 Feb 2007 00:07:02 -0000 >@@ -27,7 +27,7 @@ > /** > * @see org.eclipse.team.internal.ui.actions.TeamAction#isEnabled() > */ >- protected boolean isEnabled() { >+ public boolean isEnabled() { > return getSelectedMappings().length > 0; > } > >Index: src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java,v >retrieving revision 1.1 >diff -u -r1.1 DisconnectAction.java >--- src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java 21 Feb 2007 22:24:12 -0000 1.1 >+++ src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java 22 Feb 2007 00:07:02 -0000 >@@ -10,6 +10,8 @@ > *******************************************************************************/ > package org.eclipse.team.examples.filesystem.ui; > >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; > import org.eclipse.core.resources.IProject; > import org.eclipse.jface.action.IAction; > import org.eclipse.jface.dialogs.ErrorDialog; >@@ -36,11 +38,10 @@ > ErrorDialog.openError(getShell(), Policy.bind("DisconnectAction.errorTitle"), null, e.getStatus()); //$NON-NLS-1$ > } > } >- >- /** >- * @see TeamAction#isEnabled() >- */ >- protected boolean isEnabled() { >- return true; >+ >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ // TODO Auto-generated method stub >+ return null; > } >+ > } >Index: src/org/eclipse/team/examples/filesystem/ui/MergeAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/MergeAction.java,v >retrieving revision 1.1 >diff -u -r1.1 MergeAction.java >--- src/org/eclipse/team/examples/filesystem/ui/MergeAction.java 21 Feb 2007 22:24:12 -0000 1.1 >+++ src/org/eclipse/team/examples/filesystem/ui/MergeAction.java 22 Feb 2007 00:07:02 -0000 >@@ -12,6 +12,8 @@ > > import java.lang.reflect.InvocationTargetException; > >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; > import org.eclipse.jface.action.IAction; > import org.eclipse.team.ui.synchronize.ModelMergeOperation; > >@@ -25,6 +27,7 @@ > public class MergeAction extends FileSystemAction { > > public void run(IAction action) { >+ System.out.println("MergeAction:run"); > try { > ModelMergeOperation operation; > if (isUseSyncFramework()) { >@@ -45,4 +48,10 @@ > private boolean isUseSyncFramework() { > return true; > } >+ >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ System.out.println("MergeAction:run"); >+ // TODO Auto-generated method stub >+ return null; >+ } > } >Index: src/org/eclipse/team/examples/filesystem/ui/GetAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java,v >retrieving revision 1.1 >diff -u -r1.1 GetAction.java >--- src/org/eclipse/team/examples/filesystem/ui/GetAction.java 21 Feb 2007 22:24:12 -0000 1.1 >+++ src/org/eclipse/team/examples/filesystem/ui/GetAction.java 22 Feb 2007 00:07:02 -0000 >@@ -12,6 +12,8 @@ > > import java.lang.reflect.InvocationTargetException; > >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; > import org.eclipse.jface.action.IAction; > import org.eclipse.team.examples.filesystem.Policy; > >@@ -41,4 +43,9 @@ > protected boolean isOverwriteOutgoing() { > return false; > } >+ >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ // TODO Auto-generated method stub >+ return null; >+ } > } >#P org.eclipse.team.cvs.ui >Index: src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java,v >retrieving revision 1.1 >diff -u -r1.1 CVSAction.java >--- src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java 20 Feb 2007 20:53:34 -0000 1.1 >+++ src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java 22 Feb 2007 00:07:03 -0000 >@@ -50,7 +50,7 @@ > * facilities for enablement handling, standard error handling, selection > * retrieval and prompting. > */ >-abstract public class CVSAction extends TeamAction implements IEditorActionDelegate, IHandler { >+abstract public class CVSAction extends TeamAction implements IEditorActionDelegate { > > private List accumulatedStatus = new ArrayList(); > private RetargetAction retargetAction; >#P org.eclipse.team.ui >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/plugin.properties,v >retrieving revision 1.1 >diff -u -r1.1 plugin.properties >--- plugin.properties 13 Feb 2007 17:27:24 -0000 1.1 >+++ plugin.properties 22 Feb 2007 00:07:03 -0000 >@@ -23,17 +23,20 @@ > TextPreferencePage.name=File Content > IgnorePreferencePage.name=Ignored Resources > >-ConfigureProject.label=&Share Project... >+ConfigureProject.label=Share Project... > ConfigureProject.tooltip=Share the project with others using a version and configuration management system. >+ConfigureProject.mnemonic=S > >-ApplyPatch.label=Appl&y Patch... >+ApplyPatch.label=Apply Patch... > ApplyPatch.tooltip=Apply a patch to one or more workspace projects. >+ApplyPatch.mnemonic=y > Command.applyPatch.name=Apply Patch... > Command.applyPatch.description=Apply a patch to one or more workspace projects. > > ImportProjectSet.label=Import Project &Set... > >-TeamGroupMenu.label=T&eam >+TeamGroupMenu.label=Team >+TeamGroupMenu.mnemonic=e > Team.viewCategory=Team > > Synchronizing.perspective=Team Synchronizing >@@ -60,6 +63,17 @@ > Command.syncLast.name=Repeat last synchronization > Command.syncLast.description=Repeat the last synchronization > >+Command.importProjectSet.name=Import Project Set... >+Command.importProjectSet.description=Import Project Set into the workspace >+ >+Command.showLocalHistory.name=Show Local History >+Command.showLocalHistory.description=Show Local History >+ >+Command.compareLocalHistory.name=Local History... >+Command.compareLocalHistory.description=Compare the Selected Resource with Local History >+ >+Command.configureProject.name=Share Project... >+ > CompressFolderView.name=Compress Folders > CompressFolderView.description=Compress in-sync folders paths > >@@ -74,8 +88,11 @@ > EnabledModels = Models > Workspace=Workspace > >-ShowLocalHistory.label=Show Local &History >-CompareLocalHistory.label= &Local History... >-CompareLocalHistory.tooltip= Compare the Selected Resource with Local History >-ReplaceLocalHistory.label= &Local History... >+ShowLocalHistory.label=Show Local History >+ShowLocalHistory.mnemonic=H >+CompareLocalHistory.label=Local History... >+CompareLocalHistory.tooltip=Compare the Selected Resource with Local History >+CompareLocalHistory.mnemonic=L >+ReplaceLocalHistory.label= Local History... > ReplaceLocalHistory.tooltip= Replace the Selected Resource with Local History >+ReplaceLocalHistory.mnemonic=L >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/plugin.xml,v >retrieving revision 1.1 >diff -u -r1.1 plugin.xml >--- plugin.xml 13 Feb 2007 17:27:24 -0000 1.1 >+++ plugin.xml 22 Feb 2007 00:07:03 -0000 >@@ -49,7 +49,7 @@ > <!-- ****************** POPUP ACTIONS *************** --> > <extension > point="org.eclipse.ui.popupMenus"> >- <objectContribution >+ <!--objectContribution > objectClass="org.eclipse.core.resources.mapping.ResourceMapping" > adaptable="true" > id="org.eclipse.team.ui.ResourceContributions"> >@@ -94,8 +94,8 @@ > name="projectGroup"> > </separator> > </menu> >- </objectContribution> >- <objectContribution >+ </objectContribution--> >+ <!--objectContribution > objectClass="org.eclipse.core.resources.mapping.ResourceMapping" > adaptable="true" > id="org.eclipse.team.ui.ProjectContributions"> >@@ -114,8 +114,8 @@ > </adapt> > </not> > </enablement> >- </objectContribution> >- <objectContribution >+ </objectContribution--> >+ <!--objectContribution > objectClass="org.eclipse.core.resources.IFile" > nameFilter="*.psf" > id="org.eclipse.team.ui.ProjectSetFileContributions"> >@@ -126,26 +126,26 @@ > enablesFor="*" > id="nonbound.org.eclipse.team.ui.ImportProjectSetAction"> > </action> >- </objectContribution> >+ </objectContribution--> > <objectContribution > adaptable="true" > id="org.eclipse.team.ui.UnmanagedFileContributions" > objectClass="org.eclipse.core.resources.IFile"> >- <action >+ <!--action > class="org.eclipse.team.internal.ui.history.ShowLocalHistory" > id="org.eclipse.team.ui.showLocalHistory" > label="%ShowLocalHistory.label" > menubarPath="team.main/group4" > enablesFor="1" >- tooltip="%ShowLocalHistory.label"/> >- <action >+ tooltip="%ShowLocalHistory.label"/--> >+ <!--action > class="org.eclipse.team.internal.ui.history.CompareLocalHistory" > id="org.eclipse.team.ui.compareLocalHistory" > label="%CompareLocalHistory.label" > menubarPath="compareWithMenu/compareWithGroup" > enablesFor="1" > overrideActionId="compareWithHistory" >- tooltip="%CompareLocalHistory.tooltip"/> >+ tooltip="%CompareLocalHistory.tooltip"/--> > <action > class="org.eclipse.team.internal.ui.history.ReplaceLocalHistory" > id="org.eclipse.team.ui.replaceLocalHistory" >@@ -285,24 +285,12 @@ > id="org.eclipse.team.ui.category.team"> > </category> > <command >- name="%Command.syncAll.name" >- categoryId="org.eclipse.team.ui.category.team" >- description="%Command.syncAll.description" >- id="org.eclipse.team.ui.synchronizeAll"> >- </command> >- <command > name="%Command.syncLast.name" > categoryId="org.eclipse.team.ui.category.team" > description="%Command.syncLast.description" > id="org.eclipse.team.ui.synchronizeLast"> > </command> > <command >- name="%Command.applyPatch.name" >- categoryId="org.eclipse.team.ui.category.team" >- description="%Command.applyPatch.description" >- id="org.eclipse.team.ui.applyPatch"> >- </command> >- <command > name="%Synchronizing.perspective" > description="%Synchronizing.openPerspectiveDescription" > categoryId="org.eclipse.ui.category.perspectives" >@@ -317,6 +305,48 @@ > description="%ViewCommand.historyView.description" > categoryId="org.eclipse.ui.category.views" > id="org.eclipse.team.ui.GenericHistoryView"/> >+ <!-- TZarna: added commands --> >+ <command >+ categoryId="org.eclipse.team.ui.category.team" >+ defaultHandler="org.eclipse.team.internal.ui.actions.ApplyPatchAction" >+ description="%Command.applyPatch.description" >+ id="org.eclipse.team.ui.applyPatch" >+ name="%Command.applyPatch.name"> >+ </command> >+ <command >+ categoryId="org.eclipse.team.ui.category.team" >+ defaultHandler="org.eclipse.team.internal.ui.actions.ConfigureProjectAction" >+ id="org.eclipse.team.ui.configureProject" >+ name="%Command.configureProject.name"> >+ </command> >+ <command >+ categoryId="org.eclipse.team.ui.category.team" >+ defaultHandler="org.eclipse.team.internal.ui.synchronize.actions.GlobalRefreshHandler" >+ description="%Command.syncAll.description" >+ id="org.eclipse.team.ui.synchronizeAll" >+ name="%Command.syncAll.name"> >+ </command> >+ <command >+ categoryId="org.eclipse.team.ui.category.team" >+ defaultHandler="org.eclipse.team.internal.ui.actions.ImportProjectSetAction" >+ description="%Command.importProjectSet.description" >+ id="org.eclipse.team.ui.importProjectSet" >+ name="%Command.importProjectSet.name"> >+ </command> >+ <command >+ categoryId="org.eclipse.team.ui.category.team" >+ defaultHandler="org.eclipse.team.internal.ui.history.ShowLocalHistory" >+ description="%Command.showLocalHistory.description" >+ id="org.eclipse.team.ui.showLocalHistory" >+ name="%Command.showLocalHistory.name"> >+ </command> >+ <command >+ categoryId="org.eclipse.team.ui.category.team" >+ defaultHandler="org.eclipse.team.internal.ui.history.CompareLocalHistory" >+ description="%Command.compareLocalHistory.description" >+ id="org.eclipse.team.ui.compareLocalHistory" >+ name="%Command.compareLocalHistory.name"> >+ </command> > </extension> > > <extension >@@ -333,7 +363,7 @@ > schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> > </extension> > <!-- action sets --> >- <extension >+ <!--extension > point="org.eclipse.ui.actionSets"> > <actionSet > label="%Command.category.name" >@@ -366,7 +396,7 @@ > menubarPath="project/additions" > tooltip="%ApplyPatch.tooltip"/> > </actionSet> >- </extension> >+ </extension--> > > <!-- file modification validator --> > >@@ -494,4 +524,188 @@ > </triggerPoint> > </extension> > >+ <!-- *************** Menus **************** --> >+ <extension >+ point="org.eclipse.ui.menus"> >+ <menuContribution >+ locationURI="menu:project?after=additions"> >+ <!-- always enabled --> >+ <command >+ commandId="org.eclipse.team.ui.applyPatch" >+ label="%ApplyPatch.label" >+ mnemonic="%ApplyPatch.mnemonic" >+ style="push" >+ tooltip="%ApplyPatch.tooltip"> >+ <visibleWhen >+ checkEnabled="false"> >+ </visibleWhen> >+ </command> >+ </menuContribution> >+ <menuContribution >+ locationURI="menu:project?after=open.ext"> >+ <!-- enablement? --> >+ <command >+ commandId="org.eclipse.team.ui.configureProject" >+ id="org.eclipse.team.ui.ConfigureProject" >+ label="%ConfigureProject.label" >+ mnemonic="%ConfigureProject.mnemonic" >+ style="push" >+ tooltip="%ConfigureProject.tooltip"> >+ </command> >+ </menuContribution> >+ <menuContribution >+ locationURI="toolbar:org.eclipse.ui.main.toolbar"> >+ <toolbar >+ id="whatever"> >+ <command >+ commandId="org.eclipse.team.ui.synchronizeAll" >+ icon="$nl$/icons/full/elcl16/synch_participants.gif" >+ label="%Command.syncAll.name" >+ style="pulldown"> >+ </command> >+ </toolbar> >+ <!--toolbar >+ id="toolbar:org.eclipse.ui.main.toolbar?after=search"> >+ <command >+ commandId="org.eclipse.team.ui.synchronizeAll2" >+ icon="$nl$/icons/full/elcl16/synch_participants.gif" >+ label="%Command.syncAll.name" >+ style="pulldown"> >+ </command> >+ </toolbar--> >+ </menuContribution> >+ <menuContribution >+ locationURI="popup:org.eclipse.ui.popup.any?after=team.main"> >+ <!-- should be enabled only for IFiles with *.psf extension, multiselection is allowed --> >+ <command >+ commandId="org.eclipse.team.ui.importProjectSet" >+ label="%Command.importProjectSet.name" >+ style="push"> >+ </command> >+ </menuContribution> >+ <menuContribution >+ locationURI="popup:team.main?after=projectGroup"> >+ <command >+ commandId="org.eclipse.team.ui.configureProject" >+ id="nonbound.org.eclipse.team.ui.ConfigureProject" >+ label="%ConfigureProject.label" >+ mnemonic="%ConfigureProject.mnemonic" >+ style="push" >+ tooltip="%ConfigureProject.tooltip"> >+ </command> >+ </menuContribution> >+ <menuContribution >+ locationURI="popup:org.eclipse.ui.popup.any"> >+ <menu >+ id="team.main" >+ label="%TeamGroupMenu.label" >+ mnemonic="%TeamGroupMenu.mnemonic"> >+ <separator >+ name="group1" >+ visible="true"> >+ </separator> >+ <separator >+ name="group2" >+ visible="true"> >+ </separator> >+ <separator >+ name="group3" >+ visible="true"> >+ </separator> >+ <separator >+ name="group4" >+ visible="true"> >+ </separator> >+ <separator >+ name="group5" >+ visible="true"> >+ </separator> >+ <separator >+ name="group6" >+ visible="true"> >+ </separator> >+ <separator >+ name="group7" >+ visible="true"> >+ </separator> >+ <separator >+ name="group8" >+ visible="true"> >+ </separator> >+ <separator >+ name="group9" >+ visible="true"> >+ </separator> >+ <separator >+ name="group10" >+ visible="true"> >+ </separator> >+ <separator >+ name="targetGroup" >+ visible="true"> >+ </separator> >+ <separator >+ name="projectGroup" >+ visible="true"> >+ </separator> >+ </menu> >+ </menuContribution> >+ <menuContribution >+ locationURI="popup:compareWithMenu?after=compareWithGroup"> >+ <command >+ commandId="org.eclipse.team.ui.compareLocalHistory" >+ label="%CompareLocalHistory.label" >+ style="push" >+ tooltip="%CompareLocalHistory.tooltip"> >+ </command> >+ </menuContribution> >+ <menuContribution >+ locationURI="popup:team.main?after=group4"> >+ <command >+ commandId="org.eclipse.team.ui.showLocalHistory" >+ label="%ShowLocalHistory.label" >+ mnemonic="%ShowLocalHistory.mnemonic" >+ style="push" >+ > >+ </command> >+ </menuContribution> >+ <menuContribution >+ locationURI="popup:compareWithMenu?after=compareWithGroup"> >+ <command >+ commandId="org.eclipse.team.ui.compareLocalHistory" >+ label="%CompareLocalHistory.label" >+ mnemonic="%CompareLocalHistory.mnemonic" >+ style="push" >+ tooltip="%CompareLocalHistory.tooltip"> >+ </command> >+ </menuContribution> >+ </extension> >+ <extension >+ point="org.eclipse.ui.handlers"> >+ <handler >+ class="org.eclipse.team.internal.ui.actions.ApplyPatchAction" >+ commandId="org.eclipse.team.ui.handler1"> >+ </handler> >+ <handler >+ class="org.eclipse.team.internal.ui.actions.ConfigureProjectAction" >+ commandId="org.eclipse.team.ui.handler3"> >+ </handler> >+ <handler >+ class="org.eclipse.team.internal.ui.actions.ImportProjectSetAction" >+ commandId="org.eclipse.team.ui.handler7"> >+ </handler> >+ <handler >+ class="org.eclipse.team.internal.ui.history.ShowLocalHistory" >+ commandId="org.eclipse.team.ui.handler9"> >+ </handler> >+ <handler >+ class="org.eclipse.team.internal.ui.history.CompareLocalHistory" >+ commandId="org.eclipse.team.ui.handler11"> >+ </handler> >+ <handler >+ class="org.eclipse.team.internal.ui.synchronize.actions.GlobalRefreshHandler" >+ commandId="org.eclipse.team.ui.handler2"> >+ </handler> >+ </extension> >+ > </plugin> >Index: src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java,v >retrieving revision 1.1 >diff -u -r1.1 ImportProjectSetAction.java >--- src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java 13 Feb 2007 17:27:24 -0000 1.1 >+++ src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java 22 Feb 2007 00:07:03 -0000 >@@ -13,6 +13,7 @@ > import java.lang.reflect.InvocationTargetException; > import java.util.Iterator; > >+import org.eclipse.core.commands.*; > import org.eclipse.core.resources.IFile; > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.IStatus; >@@ -21,20 +22,22 @@ > import org.eclipse.jface.dialogs.ErrorDialog; > import org.eclipse.jface.dialogs.ProgressMonitorDialog; > import org.eclipse.jface.operation.IRunnableWithProgress; >-import org.eclipse.jface.viewers.ISelection; >-import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.jface.viewers.*; > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.team.internal.ui.*; > import org.eclipse.ui.IObjectActionDelegate; > import org.eclipse.ui.IWorkbenchPart; >-import org.eclipse.ui.actions.ActionDelegate; >+import org.eclipse.ui.handlers.HandlerUtil; > >-public class ImportProjectSetAction extends ActionDelegate implements IObjectActionDelegate { >+// XXX: do we need to extend TeamAction here? I think not, there's no >+// functionality from TeamAction needed here >+public class ImportProjectSetAction extends AbstractHandler implements IObjectActionDelegate { > > private IStructuredSelection fSelection; > > public void run(IAction action) { >+ System.out.println("ImportProjectSetAction:run"); > final Shell shell= Display.getDefault().getActiveShell(); > try { > new ProgressMonitorDialog(shell).run(true, true, new IRunnableWithProgress() { >@@ -61,4 +64,37 @@ > public void setActivePart(IAction action, IWorkbenchPart targetPart) { > } > >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ System.out.println("ImportProjectSetAction:execute"); >+ >+ final ITreeSelection treeSelection = ((ITreeSelection) HandlerUtil >+ .getCurrentSelection(event)); >+ >+ final Shell shell = Display.getDefault().getActiveShell(); >+ try { >+ new ProgressMonitorDialog(shell).run(true, true, >+ new IRunnableWithProgress() { >+ public void run(IProgressMonitor monitor) >+ throws InvocationTargetException, >+ InterruptedException { >+ Iterator iterator = treeSelection.iterator(); >+ while (iterator.hasNext()) { >+ IFile file = (IFile) iterator.next(); >+ ProjectSetImporter.importProjectSet(file >+ .getLocation().toString(), shell, >+ monitor); >+ } >+ } >+ }); >+ } catch (InvocationTargetException exception) { >+ ErrorDialog.openError(shell, null, null, new Status(IStatus.ERROR, >+ TeamUIPlugin.PLUGIN_ID, IStatus.ERROR, >+ TeamUIMessages.ImportProjectSetAction_0, exception >+ .getTargetException())); >+ } catch (InterruptedException exception) { >+ } >+ >+ return null; >+ } >+ > } >Index: src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java,v >retrieving revision 1.1 >diff -u -r1.1 ApplyPatchAction.java >--- src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java 13 Feb 2007 17:27:24 -0000 1.1 >+++ src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java 22 Feb 2007 00:07:03 -0000 >@@ -11,19 +11,17 @@ > package org.eclipse.team.internal.ui.actions; > > import org.eclipse.compare.patch.ApplyPatchOperation; >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; > import org.eclipse.core.resources.IResource; > import org.eclipse.jface.action.IAction; > import org.eclipse.swt.custom.BusyIndicator; > import org.eclipse.swt.widgets.Display; >-import org.eclipse.team.core.TeamException; > > public class ApplyPatchAction extends TeamAction { > >- protected boolean isEnabled() throws TeamException { >- return true; >- } >- > public void run(IAction action) { >+ System.out.println("applyPatchAction:run"); > IResource[] resources = getSelectedResources(); > IResource resource = null; > if (resources.length > 0) { >@@ -33,4 +31,20 @@ > BusyIndicator.showWhile(Display.getDefault(), op); > } > >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ System.out.println("applyPatchAction:execute"); >+ >+ IResource[] resources = getSelectedResources(event); >+ >+ IResource resource = null; >+ if (resources.length > 0) { >+ resource = resources[0]; >+ } >+ ApplyPatchOperation op = new ApplyPatchOperation(getTargetPart(event), >+ resource); >+ BusyIndicator.showWhile(Display.getDefault(), op); >+ >+ return null; >+ } >+ > } >Index: src/org/eclipse/team/internal/ui/actions/TeamAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java,v >retrieving revision 1.1 >diff -u -r1.1 TeamAction.java >--- src/org/eclipse/team/internal/ui/actions/TeamAction.java 13 Feb 2007 17:27:24 -0000 1.1 >+++ src/org/eclipse/team/internal/ui/actions/TeamAction.java 22 Feb 2007 00:07:03 -0000 >@@ -17,6 +17,8 @@ > import java.util.Iterator; > import java.util.List; > >+import org.eclipse.core.commands.AbstractHandler; >+import org.eclipse.core.commands.ExecutionEvent; > import org.eclipse.core.resources.*; > import org.eclipse.core.resources.mapping.ResourceMapping; > import org.eclipse.core.runtime.IAdaptable; >@@ -26,15 +28,14 @@ > import org.eclipse.jface.operation.IRunnableWithProgress; > import org.eclipse.jface.viewers.*; > import org.eclipse.swt.custom.BusyIndicator; >-import org.eclipse.swt.widgets.Display; >-import org.eclipse.swt.widgets.Shell; >+import org.eclipse.swt.widgets.*; > import org.eclipse.team.core.RepositoryProvider; > import org.eclipse.team.core.TeamException; > import org.eclipse.team.internal.core.TeamPlugin; > import org.eclipse.team.internal.ui.TeamUIPlugin; > import org.eclipse.team.internal.ui.Utils; > import org.eclipse.ui.*; >-import org.eclipse.ui.actions.ActionDelegate; >+import org.eclipse.ui.handlers.HandlerUtil; > import org.eclipse.ui.internal.LegacyResourceSupport; > > /** >@@ -46,7 +47,7 @@ > * Team providers may also instantiate or subclass any of the > * subclasses of TeamAction provided in this package. > */ >-public abstract class TeamAction extends ActionDelegate implements IObjectActionDelegate, IViewActionDelegate, IWorkbenchWindowActionDelegate { >+public abstract class TeamAction extends AbstractHandler implements IObjectActionDelegate, IViewActionDelegate, IWorkbenchWindowActionDelegate, IActionDelegate2 { > // The current selection > private IStructuredSelection selection; > >@@ -135,6 +136,20 @@ > return (IProject[]) projects.toArray(new IProject[projects.size()]); > } > >+ protected IProject[] getSelectedProjects(ExecutionEvent event) { >+ IResource[] selectedResources = getSelectedResources(event); >+ if (selectedResources.length == 0) >+ return new IProject[0]; >+ ArrayList projects = new ArrayList(); >+ for (int i = 0; i < selectedResources.length; i++) { >+ IResource resource = selectedResources[i]; >+ if (resource.getType() == IResource.PROJECT) { >+ projects.add(resource); >+ } >+ } >+ return (IProject[]) projects.toArray(new IProject[projects.size()]); >+ } >+ > /** > * Returns an array of the given class type c that contains all > * instances of c that are either contained in the selection or >@@ -156,6 +171,17 @@ > return Utils.getContributedResources(getSelection().toArray()); > } > >+ protected IResource[] getSelectedResources(ExecutionEvent event) { >+ ISelection currentSelection = HandlerUtil.getCurrentSelection(event); >+ if (currentSelection == null >+ || !(currentSelection instanceof IStructuredSelection)) >+ currentSelection = StructuredSelection.EMPTY; >+ >+ return Utils >+ .getContributedResources(((IStructuredSelection) currentSelection) >+ .toArray()); >+ } >+ > protected IStructuredSelection getSelection() { > if (selection == null) > selection = StructuredSelection.EMPTY; >@@ -222,6 +248,26 @@ > return window.getShell(); > } > } >+ >+ protected Shell getShell(ExecutionEvent event) { >+ Shell shell = HandlerUtil.getActiveShell(event); >+ if (shell != null) { >+ return shell; >+ } else if (HandlerUtil.getActivePart(event) != null) { >+ return HandlerUtil.getActivePart(event).getSite().getShell(); >+ } else if (HandlerUtil.getActiveWorkbenchWindow(event) != null) { >+ return HandlerUtil.getActiveWorkbenchWindow(event).getShell(); >+ } else { >+ IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench(); >+ if (workbench == null) >+ return null; >+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); >+ if (window == null) >+ return null; >+ return window.getShell(); >+ } >+ } >+ > /** > * Convenience method for running an operation with progress and > * error feedback. >@@ -262,6 +308,51 @@ > } > } > >+ /** >+ * Convenience method for running an operation with progress and error >+ * feedback. >+ * >+ * @param runnable >+ * the runnable which executes the operation >+ * @param problemMessage >+ * the message to display in the case of errors >+ * @param progressKind >+ * one of PROGRESS_BUSYCURSOR or PROGRESS_DIALOG >+ */ >+ final protected void run(final IRunnableWithProgress runnable, >+ final String problemMessage, int progressKind, ExecutionEvent event) { >+ final Exception[] exceptions = new Exception[] { null }; >+ switch (progressKind) { >+ case PROGRESS_BUSYCURSOR: >+ BusyIndicator.showWhile(Display.getCurrent(), new Runnable() { >+ public void run() { >+ try { >+ runnable.run(new NullProgressMonitor()); >+ } catch (InvocationTargetException e) { >+ exceptions[0] = e; >+ } catch (InterruptedException e) { >+ exceptions[0] = null; >+ } >+ } >+ }); >+ break; >+ default: >+ case PROGRESS_DIALOG: >+ try { >+ new ProgressMonitorDialog(HandlerUtil.getActiveShell(event)) >+ .run(true, true, runnable); >+ } catch (InvocationTargetException e) { >+ exceptions[0] = e; >+ } catch (InterruptedException e) { >+ exceptions[0] = null; >+ } >+ break; >+ } >+ if (exceptions[0] != null) { >+ handle(exceptions[0], null, problemMessage, event); >+ } >+ } >+ > /* > * Method declared on IActionDelegate. > */ >@@ -284,11 +375,11 @@ > * This method can be overridden by subclasses but should not be invoked by them. > */ > protected void setActionEnablement(IAction action) { >- try { >+// try { > action.setEnabled(isEnabled()); >- } catch (TeamException e) { >- action.setEnabled(isEnabledForException(e)); >- } >+// } catch (TeamException e) { >+// action.setEnabled(isEnabledForException(e)); >+// } > } > > /** >@@ -328,13 +419,20 @@ > } > > /** >- * Concrete action enablement code. >- * Subclasses must implement. >+ * Shows the given errors to the user. > * >- * @return whether the action is enabled >- * @throws TeamException if an error occurs during enablement detection >- */ >- abstract protected boolean isEnabled() throws TeamException; >+ * @param exception >+ * the status containing the error >+ * @param title >+ * the title of the error dialog >+ * @param message >+ * the message for the error dialog >+ */ >+ protected void handle(Exception exception, String title, String message, >+ ExecutionEvent event) { >+ Utils.handleError(HandlerUtil.getActiveShell(event), exception, title, >+ message); >+ } > > /** > * Convenience method that maps the given resources to their providers. >@@ -370,6 +468,10 @@ > return targetPart; > > } >+ >+ protected IWorkbenchPart getTargetPart(ExecutionEvent event) { >+ return HandlerUtil.getActivePart(event); >+ } > > /** > * Return the path that was active when the menu item was selected. >@@ -422,4 +524,21 @@ > } > selection = null; > } >+ >+ /** >+ * The <code>TeamAction</code> implementation of this >+ * <code>IActionDelegate2</code> method does nothing. Subclasses may >+ * reimplement. >+ */ >+ public void init(IAction action) { >+ } >+ >+ /** >+ * The <code>TeamAction</code> implementation of this >+ * <code>IActionDelegate2</code> method redirects to the <code>run</code> >+ * method. Subclasses may reimplement. >+ */ >+ public void runWithEvent(IAction action, Event event) { >+ run(action); >+ } > } >Index: src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java,v >retrieving revision 1.1 >diff -u -r1.1 ConfigureProjectAction.java >--- src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java 13 Feb 2007 17:27:24 -0000 1.1 >+++ src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java 22 Feb 2007 00:07:03 -0000 >@@ -13,6 +13,8 @@ > > import java.lang.reflect.InvocationTargetException; > >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; > import org.eclipse.core.resources.IProject; > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.jface.action.IAction; >@@ -21,7 +23,6 @@ > import org.eclipse.jface.wizard.WizardDialog; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Shell; >-import org.eclipse.team.core.RepositoryProvider; > import org.eclipse.team.internal.ui.TeamUIMessages; > import org.eclipse.team.internal.ui.wizards.ConfigureProjectWizard; > import org.eclipse.ui.IWorkbenchWindow; >@@ -44,6 +45,7 @@ > * Method declared on IActionDelegate. > */ > public void run(IAction action) { >+ System.out.println("ConfigureProjectAction:run"); > run(new IRunnableWithProgress() { > public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { > try { >@@ -62,17 +64,37 @@ > /** > * @see TeamAction#isEnabled() > */ >- protected boolean isEnabled() { >- IProject[] selectedProjects = getSelectedProjects(); >- if (selectedProjects.length != 1) return false; >- if (!selectedProjects[0].isAccessible()) return false; >- if (!RepositoryProvider.isShared(selectedProjects[0])) return true; >- return false; >- } >+// public boolean isEnabled() { >+// IProject[] selectedProjects = getSelectedProjects(); >+// if (selectedProjects.length != 1) return false; >+// if (!selectedProjects[0].isAccessible()) return false; >+// if (!RepositoryProvider.isShared(selectedProjects[0])) return true; >+// return false; >+// } > > /* (non-Javadoc) > * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow) > */ > public void init(IWorkbenchWindow window) { > } >+ >+ public Object execute(final ExecutionEvent event) throws ExecutionException { >+ System.out.println("ConfigureProjectAction:execute"); >+ run(new IRunnableWithProgress() { >+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { >+ try { >+ IProject project = getSelectedProjects(event)[0]; >+ ConfigureProjectWizard wizard = new ConfigureProjectWizard(); >+ wizard.init(null, project); >+ WizardDialog dialog = new ResizeWizardDialog(getShell(event), wizard); >+ //dialog. >+ dialog.open(); >+ } catch (Exception e) { >+ throw new InvocationTargetException(e); >+ } >+ } >+ }, TeamUIMessages.ConfigureProjectAction_configureProject, TeamAction.PROGRESS_BUSYCURSOR,event); >+ >+ return null; >+ } > } >Index: src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java,v >retrieving revision 1.1 >diff -u -r1.1 ShowLocalHistory.java >--- src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java 13 Feb 2007 17:27:24 -0000 1.1 >+++ src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java 22 Feb 2007 00:07:03 -0000 >@@ -12,29 +12,31 @@ > > import java.lang.reflect.InvocationTargetException; > >+import org.eclipse.core.commands.*; > import org.eclipse.core.resources.*; > import org.eclipse.core.runtime.*; > import org.eclipse.jface.action.IAction; > import org.eclipse.jface.dialogs.ErrorDialog; > import org.eclipse.jface.dialogs.MessageDialog; > import org.eclipse.jface.operation.IRunnableWithProgress; >-import org.eclipse.jface.viewers.ISelection; >-import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.jface.viewers.*; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.team.internal.ui.TeamUIMessages; > import org.eclipse.team.internal.ui.TeamUIPlugin; >+import org.eclipse.team.internal.ui.actions.TeamAction; > import org.eclipse.team.ui.TeamUI; > import org.eclipse.team.ui.history.IHistoryPage; > import org.eclipse.team.ui.history.IHistoryView; > import org.eclipse.ui.*; >-import org.eclipse.ui.actions.ActionDelegate; >+import org.eclipse.ui.handlers.HandlerUtil; > >-public class ShowLocalHistory extends ActionDelegate implements IObjectActionDelegate { >+public class ShowLocalHistory extends TeamAction implements IObjectActionDelegate { > > private IStructuredSelection fSelection; > private IWorkbenchPart targetPart; > > public void run(IAction action) { >+ System.out.println("ShowLocalHistoryHandler:run"); > IFileState states[]= getLocalHistory(); > if (states == null || states.length == 0) > return; >@@ -84,6 +86,16 @@ > return fSelection; > } > >+ public IStructuredSelection getSelection(ExecutionEvent event) { >+// return fSelection; >+ ISelection currentSelection = HandlerUtil.getCurrentSelection(event); >+ if (currentSelection == null >+ || !(currentSelection instanceof IStructuredSelection)) >+ currentSelection = StructuredSelection.EMPTY; >+ >+ return (IStructuredSelection) currentSelection; >+ } >+ > protected IFileState[] getLocalHistory() { > final IFile file = (IFile) getSelection().getFirstElement(); > IFileState states[]; >@@ -100,9 +112,55 @@ > } > return states; > } >+ >+ protected IFileState[] getLocalHistory(ExecutionEvent event) { >+ final IFile file = (IFile) getSelection(event).getFirstElement(); >+ IFileState states[]; >+ try { >+ states= file.getHistory(null); >+ } catch (CoreException ex) { >+ MessageDialog.openError(getShell(event), getPromptTitle(), ex.getMessage()); >+ return null; >+ } >+ >+ if (states == null || states.length <= 0) { >+ MessageDialog.openInformation(getShell(event), getPromptTitle(), TeamUIMessages.ShowLocalHistory_0); >+ return states; >+ } >+ return states; >+ } > > protected String getPromptTitle() { > return TeamUIMessages.ShowLocalHistory_2; > } > >+ public Object execute(final ExecutionEvent event) throws ExecutionException { >+ System.out.println("ShowLocalHistoryHandler:execute"); >+ IFileState states[]= getLocalHistory(event); >+ if (states == null || states.length == 0) >+ return null; >+ try { >+ PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() { >+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { >+ final IResource resource = (IResource) getSelection(event).getFirstElement(); >+ Runnable r = new Runnable() { >+ public void run() { >+ IHistoryView view = TeamUI.showHistoryFor(TeamUIPlugin.getActivePage(), resource, LocalHistoryPageSource.getInstance()); >+ IHistoryPage page = view.getHistoryPage(); >+ if (page instanceof LocalHistoryPage){ >+ LocalHistoryPage historyPage = (LocalHistoryPage) page; >+ historyPage.setClickAction(isCompare()); >+ } >+ } >+ }; >+ TeamUIPlugin.getStandardDisplay().asyncExec(r); >+ } >+ }); >+ } catch (InvocationTargetException exception) { >+ ErrorDialog.openError(getShell(event), null, null, new Status(IStatus.ERROR, TeamUIPlugin.PLUGIN_ID, IStatus.ERROR, TeamUIMessages.ShowLocalHistory_1, exception.getTargetException())); >+ } catch (InterruptedException exception) { >+ } >+ return null; >+ } >+ > } >Index: src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshHandler.java >=================================================================== >RCS file: src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshHandler.java >diff -N src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,24 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.team.internal.ui.synchronize.actions; >+ >+import org.eclipse.core.commands.*; >+ >+public class GlobalRefreshHandler extends AbstractHandler { >+ >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ System.out.println("GlobalRefreshHandler:execute"); >+ >+ // TODO Auto-generated method stub >+ return null; >+ } >+ >+} >Index: src/org/eclipse/team/ui/CompoundContributionItem2.java >=================================================================== >RCS file: src/org/eclipse/team/ui/CompoundContributionItem2.java >diff -N src/org/eclipse/team/ui/CompoundContributionItem2.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/team/ui/CompoundContributionItem2.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,45 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.team.ui; >+ >+import java.util.ArrayList; >+ >+import org.eclipse.jface.action.*; >+import org.eclipse.ui.actions.CompoundContributionItem; >+import org.eclipse.ui.internal.WorkbenchMessages; >+ >+public class CompoundContributionItem2 extends CompoundContributionItem { >+ >+ public CompoundContributionItem2() { >+ super(); >+ } >+ >+ public CompoundContributionItem2(String id) { >+ super(id); >+ // TODO Auto-generated constructor stub >+ } >+ >+ protected IContributionItem[] getContributionItems() { >+ ArrayList list = new ArrayList(); >+ >+ String text = WorkbenchMessages.Workbench_noApplicableItems; >+ Action dummyAction = new Action(text) { >+ // dummy inner class; no methods >+ }; >+ dummyAction.setEnabled(false); >+ list.add(new ActionContributionItem(dummyAction)); >+ >+ return (IContributionItem[]) list.toArray(new IContributionItem[list.size()]); >+ >+// return null; >+ } >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 173457
:
59139
|
59140
|
59355
| 59496