easystruts-cvs Mailing List for EasyStruts (Page 2)
Brought to you by:
eboudrant,
pombredanne
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
(39) |
May
(128) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(16) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(22) |
Feb
(21) |
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Philippe O. <pom...@us...> - 2006-02-07 01:34:15
|
Update of /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2126/src/org/sf/easyexplore/actions Modified Files: EasyExploreAction.java EasyCommandAction.java EasyBaseAction.java Log Message: Added support for Key bindings for the the explore and command actions. Using a hack...with a double definition of the action both as a pop-menu and action set to wor around this eclipse limitation. Explore maps to Shift+Esc X and Command maps to Shift+Esc C.... Index: EasyExploreAction.java =================================================================== RCS file: /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/actions/EasyExploreAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EasyExploreAction.java 27 Jan 2006 02:31:11 -0000 1.2 --- EasyExploreAction.java 7 Feb 2006 01:33:58 -0000 1.3 *************** *** 2,7 **** import org.eclipse.jface.action.IAction; - import org.eclipse.ui.IActionDelegate; - import org.eclipse.ui.IObjectActionDelegate; import org.sf.easyexplore.EasyExplorePlugin; --- 2,5 ---- Index: EasyBaseAction.java =================================================================== RCS file: /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/actions/EasyBaseAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyBaseAction.java 27 Jan 2006 02:31:11 -0000 1.1 --- EasyBaseAction.java 7 Feb 2006 01:33:59 -0000 1.2 *************** *** 17,24 **** import org.eclipse.ui.IObjectActionDelegate; import org.eclipse.ui.IWorkbenchPart; import org.sf.easyexplore.EasyExplorePlugin; ! public abstract class EasyBaseAction implements ! IObjectActionDelegate { private Object selected = null; --- 17,26 ---- import org.eclipse.ui.IObjectActionDelegate; import org.eclipse.ui.IWorkbenchPart; + import org.eclipse.ui.IWorkbenchWindow; + import org.eclipse.ui.IWorkbenchWindowActionDelegate; import org.sf.easyexplore.EasyExplorePlugin; ! public abstract class EasyBaseAction implements IObjectActionDelegate, ! IWorkbenchWindowActionDelegate { private Object selected = null; *************** *** 31,45 **** public void setActivePart(IAction action, IWorkbenchPart targetPart) { } ! /** * @see IActionDelegate#run(IAction) */ public void run(IAction action) { ! runAction(action); } - ! public abstract void runAction(IAction action) ; ! public void run(IAction action, String target) { --- 33,45 ---- public void setActivePart(IAction action, IWorkbenchPart targetPart) { } ! /** * @see IActionDelegate#run(IAction) */ public void run(IAction action) { ! runAction(action); } ! public abstract void runAction(IAction action); public void run(IAction action, String target) { *************** *** 139,141 **** --- 139,151 ---- } + public void dispose() { + // TODO Auto-generated method stub + + } + + public void init(IWorkbenchWindow arg0) { + // TODO Auto-generated method stub + + } + } Index: EasyCommandAction.java =================================================================== RCS file: /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/actions/EasyCommandAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyCommandAction.java 27 Jan 2006 02:31:11 -0000 1.1 --- EasyCommandAction.java 7 Feb 2006 01:33:59 -0000 1.2 *************** *** 18,21 **** } } - } --- 18,20 ---- |
From: Philippe O. <pom...@us...> - 2006-02-07 01:34:15
|
Update of /cvsroot/easystruts/org.sf.easyexplore In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2126 Modified Files: plugin.xml Log Message: Added support for Key bindings for the the explore and command actions. Using a hack...with a double definition of the action both as a pop-menu and action set to wor around this eclipse limitation. Explore maps to Shift+Esc X and Command maps to Shift+Esc C.... Index: plugin.xml =================================================================== RCS file: /cvsroot/easystruts/org.sf.easyexplore/plugin.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** plugin.xml 27 Jan 2006 02:31:11 -0000 1.2 --- plugin.xml 7 Feb 2006 01:33:59 -0000 1.3 *************** *** 12,28 **** objectClass="org.eclipse.core.runtime.IAdaptable" id="org.sf.easyexplore.contribution"> <visibility> <or> ! <objectClass ! name="org.eclipse.core.resources.IResource" /> ! <objectClass ! name="org.eclipse.ui.model.IWorkbenchAdapter" /> ! <objectClass ! name="org.eclipse.jdt.core.ICompilationUnit" /> </or> ! </visibility> <action class="org.sf.easyexplore.actions.EasyExploreAction" ! definitionId="org.sf.easyexplore.actions.EasyExploreCommand" enablesFor="1" icon="icon/easyexplore.gif" --- 12,30 ---- objectClass="org.eclipse.core.runtime.IAdaptable" id="org.sf.easyexplore.contribution"> + <!-- <visibility> <or> ! <objectClass name="org.eclipse.core.resources.IResource" /> ! <objectClass name="org.eclipse.ui.model.IWorkbenchAdapter" /> ! <objectClass name="org.eclipse.jdt.core.ICompilationUnit" /> ! <objectClass name="org.eclipse.core.resources.IProject"/> ! <objectClass name="org.eclipse.core.resources.IFolder"/> ! <objectClass name="org.eclipse.core.resources.IFile"/> </or> ! </visibility> ! --> <action class="org.sf.easyexplore.actions.EasyExploreAction" ! definitionId="org.sf.easyexplore.actions.EasyExploreActionCommand" enablesFor="1" icon="icon/easyexplore.gif" *************** *** 33,37 **** <action class="org.sf.easyexplore.actions.EasyCommandAction" ! definitionId="org.sf.easyexplore.actions.EasyCommandCommand" enablesFor="1" icon="icon/easycommand.gif" --- 35,39 ---- <action class="org.sf.easyexplore.actions.EasyCommandAction" ! definitionId="org.sf.easyexplore.actions.EasyCommandActionCommand" enablesFor="1" icon="icon/easycommand.gif" *************** *** 43,74 **** </extension> <extension - point="org.eclipse.ui.bindings"> - <key - commandId="org.sf.easyexplore.actions.EasyCommandCommand" - contextId="org.eclipse.ui.contexts.dialogAndWindow" - schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" - sequence="M1+M2+A"/> - <key - commandId="org.sf.easyexplore.actions.EasyExploreCommand" - contextId="org.eclipse.ui.contexts.dialogAndWindow" - schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" - sequence="M1+M2+Q"/> - </extension> - <extension point="org.eclipse.ui.commands"> <category ! description="Open an Explorer and a command prompt" id="org.sf.easyexplore.category" name="EasyExplore"/> <command categoryId="org.sf.easyexplore.category" ! description="Execute a system command on a file" ! id="org.sf.easyexplore.actions.EasyCommandCommand" name="EasyCommand"/> <command categoryId="org.sf.easyexplore.category" ! description="Open a file explorer on a file" ! id="org.sf.easyexplore.actions.EasyExploreCommand" name="EasyExplore"/> </extension> </plugin> \ No newline at end of file --- 45,124 ---- </extension> <extension point="org.eclipse.ui.commands"> <category ! description="EasyExplore: easy os integration" id="org.sf.easyexplore.category" name="EasyExplore"/> <command categoryId="org.sf.easyexplore.category" ! description="Execute a system command on a file" ! id="org.sf.easyexplore.actions.EasyCommandActionCommand" name="EasyCommand"/> <command categoryId="org.sf.easyexplore.category" ! description="Open an explorer on a file" ! id="org.sf.easyexplore.actions.EasyExploreActionCommand" name="EasyExplore"/> </extension> + <extension + point="org.eclipse.ui.bindings"> + <key + commandId="org.sf.easyexplore.actions.EasyCommandActionCommand" + contextId="org.eclipse.ui.contexts.dialogAndWindow" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" + sequence="SHIFT+ESC C"/> + <key + commandId="org.sf.easyexplore.actions.EasyExploreActionCommand" + contextId="org.eclipse.ui.contexts.dialogAndWindow" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" + sequence="SHIFT+ESC X"/> + </extension> + <extension point="org.eclipse.ui.actionSets"> + <actionSet id="org.sf.easyexplore.contribution.actionSet" label="EasyExplore" visible="true"> + <action + class="org.sf.easyexplore.actions.EasyExploreAction" + definitionId="org.sf.easyexplore.actions.EasyExploreActionCommand" + enablesFor="1" + id="org.sf.easyexplore.actions.EasyExploreActionSet" + label="Easy explore here..."> + </action> + <action + class="org.sf.easyexplore.actions.EasyCommandAction" + definitionId="org.sf.easyexplore.actions.EasyCommandActionCommand" + enablesFor="1" + id="org.sf.easyexplore.actions.EasyCommandActionSet" + label="Easy command here..." > + </action> + + </actionSet> + </extension> + <!-- + <extension + point="org.eclipse.ui.perspectiveExtensions"> + <perspectiveExtension targetID="org.eclipse.ui.resourcePerspective"> + <actionSet id="org.sf.easyexplore.contribution.actionSet"/> + </perspectiveExtension> + <perspectiveExtension targetID="org.eclipse.debug.ui.DebugPerspective"> + <actionSet id="org.sf.easyexplore.contribution.actionSet"/> + </perspectiveExtension> + <perspectiveExtension targetID="org.eclipse.jdt.ui.JavaBrowsingPerspective"> + <actionSet id="org.sf.easyexplore.contribution.actionSet"/> + </perspectiveExtension> + <perspectiveExtension targetID="org.eclipse.jdt.ui.JavaPerspective"> + <actionSet id="org.sf.easyexplore.contribution.actionSet"/> + </perspectiveExtension> + <perspectiveExtension targetID="org.eclipse.jdt.ui.JavaHierarchyPerspective"> + <actionSet id="org.sf.easyexplore.contribution.actionSet"/> + </perspectiveExtension> + <perspectiveExtension targetID="org.eclipse.pde.ui.PDEPerspective"> + <actionSet id="org.sf.easyexplore.contribution.actionSet"/> + </perspectiveExtension> + <perspectiveExtension targetID="org.eclipse.team.cvs.ui.cvsPerspective"> + <actionSet id="org.sf.easyexplore.contribution.actionSet"/> + </perspectiveExtension> + <perspectiveExtension targetID="org.eclipse.team.ui.TeamSynchronizingPerspective"> + <actionSet id="org.sf.easyexplore.contribution.actionSet"/> + </perspectiveExtension> + </extension> + --> </plugin> \ No newline at end of file |
From: Philippe O. <pom...@us...> - 2006-02-07 01:34:15
|
Update of /cvsroot/easystruts/org.sf.easyexplore/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2126/META-INF Modified Files: MANIFEST.MF Log Message: Added support for Key bindings for the the explore and command actions. Using a hack...with a double definition of the action both as a pop-menu and action set to wor around this eclipse limitation. Explore maps to Shift+Esc X and Command maps to Shift+Esc C.... Index: MANIFEST.MF =================================================================== RCS file: /cvsroot/easystruts/org.sf.easyexplore/META-INF/MANIFEST.MF,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MANIFEST.MF 27 Jan 2006 02:31:11 -0000 1.2 --- MANIFEST.MF 7 Feb 2006 01:33:59 -0000 1.3 *************** *** 2,6 **** Bundle-Name: %pluginName Bundle-SymbolicName: org.sf.easyexplore; singleton=true ! Bundle-Version: 1.1.0 Bundle-Vendor: %providerName Bundle-ClassPath: . --- 2,6 ---- Bundle-Name: %pluginName Bundle-SymbolicName: org.sf.easyexplore; singleton=true ! Bundle-Version: 1.2.0 Bundle-Vendor: %providerName Bundle-ClassPath: . |
From: Philippe O. <pom...@us...> - 2006-01-27 02:31:21
|
Update of /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29857/src/org/sf/easyexplore Modified Files: EasyExplorePlugin.java Log Message: A small upgrade to run also a comamnd and get the right default command on windows... I use it all the time. Index: EasyExplorePlugin.java =================================================================== RCS file: /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/EasyExplorePlugin.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyExplorePlugin.java 26 Jan 2006 20:37:57 -0000 1.1 --- EasyExplorePlugin.java 27 Jan 2006 02:31:11 -0000 1.2 *************** *** 1,4 **** package org.sf.easyexplore; ! import java.io.PrintWriter; import java.io.StringWriter; --- 1,4 ---- package org.sf.easyexplore; ! import java.io.PrintWriter; import java.io.StringWriter; *************** *** 9,42 **** import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.ILog; - import org.eclipse.core.runtime.IPluginDescriptor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.sf.easyexplore.preferences.EasyExplorePreferencePage; /** ! * The main plugin class to be used in the desktop. */ public class EasyExplorePlugin extends AbstractUIPlugin { ! //The shared instance. private static EasyExplorePlugin plugin; ! //Resource bundle. private ResourceBundle resourceBundle; ! ! /** ! * The constructor. ! */ ! public EasyExplorePlugin(IPluginDescriptor descriptor) { ! super(descriptor); plugin = this; try { ! resourceBundle= ResourceBundle.getBundle("org.sf.easyexplore.EasyExplorePluginResources"); } catch (MissingResourceException x) { ! // throw new NullPointerException("unnable to load resources org.sf.easyexplore.EasyExplorePluginResources"); } } /** * Returns the shared instance. */ --- 9,56 ---- import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.ILog; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.ui.plugin.AbstractUIPlugin; + import org.osgi.framework.BundleContext; import org.sf.easyexplore.preferences.EasyExplorePreferencePage; /** ! * Added support for a comamnd prompt and updated the default for openining Explorer in right folder. ! * Thanks to Chris Gittings and anonymous on page : http://eclipse-plugins.info/eclipse/plugin_comments.jsp?id=192 */ public class EasyExplorePlugin extends AbstractUIPlugin { ! // The shared instance. private static EasyExplorePlugin plugin; ! private ResourceBundle resourceBundle; ! ! public EasyExplorePlugin() { plugin = this; try { ! resourceBundle = ResourceBundle ! .getBundle("org.sf.easyexplore.EasyExplorePluginResources"); } catch (MissingResourceException x) { ! // throw new NullPointerException("unnable to load resources ! // org.sf.easyexplore.EasyExplorePluginResources"); } } /** + * This method is called upon plug-in activation + */ + public void start(BundleContext context) throws Exception { + super.start(context); + } + + /** + * This method is called when the plug-in is stopped + */ + public void stop(BundleContext context) throws Exception { + super.stop(context); + plugin = null; + } + + /** * Returns the shared instance. */ *************** *** 53,64 **** /** ! * Returns the string from the plugin's resource bundle, ! * or 'key' if not found. */ public static String getResourceString(String key) { ! ResourceBundle bundle= EasyExplorePlugin.getDefault().getResourceBundle(); String res = null; try { ! res = bundle.getString(key); } catch (MissingResourceException e) { res = key; --- 67,79 ---- /** ! * Returns the string from the plugin's resource bundle, or 'key' if not ! * found. */ public static String getResourceString(String key) { ! ResourceBundle bundle = EasyExplorePlugin.getDefault() ! .getResourceBundle(); String res = null; try { ! res = bundle.getString(key); } catch (MissingResourceException e) { res = key; *************** *** 73,125 **** return resourceBundle; } ! static public void log(Object msg) { ILog log = EasyExplorePlugin.getDefault().getLog(); ! Status status = new Status(IStatus.INFO, EasyExplorePlugin.getDefault().getDescriptor().getUniqueIdentifier(), IStatus.ERROR, msg + "\n", null); log.log(status); } ! static public void log(Throwable ex) { ILog log = EasyExplorePlugin.getDefault().getLog(); StringWriter stringWriter = new StringWriter(); ! ex.printStackTrace(new PrintWriter(stringWriter)); String msg = stringWriter.getBuffer().toString(); ! Status status = new Status(IStatus.ERROR, EasyExplorePlugin.getDefault().getDescriptor().getUniqueIdentifier(), IStatus.ERROR, msg, null); log.log(status); } /** * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore) */ protected void initializeDefaultPreferences(IPreferenceStore store) { - String defaultTarget = "shell_open_command {0}"; String osName = System.getProperty("os.name"); ! if ( osName.indexOf("Windows") != -1 ) { ! defaultTarget = "explorer.exe {0}"; ! } ! else if ( osName.indexOf("Mac") != -1 ) { ! defaultTarget = "open {0}"; } - store.setDefault(EasyExplorePreferencePage.P_TARGET, defaultTarget); } ! /** ! * Return the target program setted in EasyExplorePreferencePage. * @return String */ public String getTarget() { ! return getPreferenceStore().getString(EasyExplorePreferencePage.P_TARGET); } /** ! * Tells whether this platform is currently supported. ! * The implementation of this method must be in sync with the implementation of ! * <a href="#initializeDefaultPreferences(IPreferenceStore)">initializeDefaultPreferences(IPreferenceStore)</a>. */ ! public boolean isSupported() { ! String osName = System.getProperty("os.name"); ! return (( osName.indexOf("Windows") != -1 ) ! || ( osName.indexOf("Mac") != -1 )); } } --- 88,164 ---- return resourceBundle; } ! static public void log(Object msg) { ILog log = EasyExplorePlugin.getDefault().getLog(); ! Status status = new Status(IStatus.INFO, EasyExplorePlugin.getDefault() ! .getDescriptor().getUniqueIdentifier(), IStatus.ERROR, msg ! + "\n", null); log.log(status); } ! static public void log(Throwable ex) { ILog log = EasyExplorePlugin.getDefault().getLog(); StringWriter stringWriter = new StringWriter(); ! ex.printStackTrace(new PrintWriter(stringWriter)); String msg = stringWriter.getBuffer().toString(); ! Status status = new Status(IStatus.ERROR, EasyExplorePlugin ! .getDefault().getDescriptor().getUniqueIdentifier(), ! IStatus.ERROR, msg, null); log.log(status); } + /** * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore) */ protected void initializeDefaultPreferences(IPreferenceStore store) { String osName = System.getProperty("os.name"); ! ! String defaultTarget = "shell_open_command {0}"; ! if (osName.indexOf("Windows") != -1) { ! defaultTarget = "explorer.exe /n,/e,{0}"; ! } else if (osName.indexOf("Mac") != -1) { ! defaultTarget = "open {0}"; } store.setDefault(EasyExplorePreferencePage.P_TARGET, defaultTarget); + + String defaultCommand = "shell_open_command {0}"; + if (osName.indexOf("Windows") != -1) { + defaultCommand = "cmd /C start cmd /K cd {0}"; + } else if (osName.indexOf("Mac") != -1) { + defaultCommand = "open {0}"; + } + store.setDefault(EasyExplorePreferencePage.P_COMMAND, defaultCommand); } ! /** ! * Return the target explorer program configured in ! * EasyExplorePreferencePage. ! * * @return String */ public String getTarget() { ! return getPreferenceStore().getString( ! EasyExplorePreferencePage.P_TARGET); } /** ! * Return the target command program configured in ! * EasyExplorePreferencePage. ! * ! * @return String */ ! public String getCommand() { ! return getPreferenceStore().getString( ! EasyExplorePreferencePage.P_COMMAND); ! } + /** + * Tells whether this platform is currently supported. The implementation of + * this method must be in sync with the implementation of <a + * href="#initializeDefaultPreferences(IPreferenceStore)">initializeDefaultPreferences(IPreferenceStore)</a>. + */ + public boolean isSupported() { + String osName = System.getProperty("os.name").toLowerCase(); + return ((osName.indexOf("windows") != -1) || (osName.indexOf("mac") != -1)); } } |
From: Philippe O. <pom...@us...> - 2006-01-27 02:31:21
|
Update of /cvsroot/easystruts/org.sf.easyexplore/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29857/META-INF Modified Files: MANIFEST.MF Log Message: A small upgrade to run also a comamnd and get the right default command on windows... I use it all the time. Index: MANIFEST.MF =================================================================== RCS file: /cvsroot/easystruts/org.sf.easyexplore/META-INF/MANIFEST.MF,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MANIFEST.MF 26 Jan 2006 20:37:56 -0000 1.1 --- MANIFEST.MF 27 Jan 2006 02:31:11 -0000 1.2 *************** *** 5,16 **** Bundle-Vendor: %providerName Bundle-ClassPath: . ! Bundle-Activator: easyexplore.jar Bundle-Localization: plugin ! Require-Bundle: org.eclipse.core.runtime.compatibility, ! org.eclipse.ui.ide, ! org.eclipse.ui.views, ! org.eclipse.jface.text, ! org.eclipse.ui.workbench.texteditor, ! org.eclipse.ui.editors, org.eclipse.core.resources, org.eclipse.ui, --- 5,11 ---- Bundle-Vendor: %providerName Bundle-ClassPath: . ! Bundle-Activator: org.sf.easyexplore.EasyExplorePlugin Bundle-Localization: plugin ! Require-Bundle: org.eclipse.core.runtime.compatibility, org.eclipse.core.resources, org.eclipse.ui, |
From: Philippe O. <pom...@us...> - 2006-01-27 02:31:21
|
Update of /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29857/src/org/sf/easyexplore/actions Modified Files: EasyExploreAction.java Added Files: EasyCommandAction.java EasyBaseAction.java Log Message: A small upgrade to run also a comamnd and get the right default command on windows... I use it all the time. Index: EasyExploreAction.java =================================================================== RCS file: /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/actions/EasyExploreAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyExploreAction.java 26 Jan 2006 20:37:56 -0000 1.1 --- EasyExploreAction.java 27 Jan 2006 02:31:11 -0000 1.2 *************** *** 1,125 **** package org.sf.easyexplore.actions; - import java.io.File; - import java.text.MessageFormat; - - import org.sf.easyexplore.EasyExplorePlugin; - import org.eclipse.core.resources.IFile; - import org.eclipse.core.resources.IResource; - import org.eclipse.core.runtime.IAdaptable; - import org.eclipse.jdt.internal.core.JarPackageFragmentRoot; - import org.eclipse.jdt.internal.core.PackageFragment; import org.eclipse.jface.action.IAction; ! import org.eclipse.jface.dialogs.MessageDialog; ! import org.eclipse.jface.viewers.ISelection; ! import org.eclipse.jface.viewers.IStructuredSelection; ! import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IObjectActionDelegate; ! import org.eclipse.ui.IWorkbenchPart; ! ! public class EasyExploreAction implements IObjectActionDelegate { ! ! private Object selected=null; ! private Class selectedClass=null; ! /** ! * Constructor for EasyExploreAction. ! */ ! public EasyExploreAction() { ! super(); ! } ! /** ! * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) ! */ ! public void setActivePart(IAction action, IWorkbenchPart targetPart) { ! } ! /** ! * @see IActionDelegate#run(IAction) ! */ ! public void run(IAction action) { try { - if ( "unknown".equals(selected) ) { - MessageDialog.openInformation(new Shell(),"Easy Explore","Unable to explore " + selectedClass.getName()); - EasyExplorePlugin.log("Unable to explore " + selectedClass); - return; - } - File directory = null; - if ( selected instanceof IResource ) { - directory= new File(((IResource)selected).getLocation().toOSString()); - } else if ( selected instanceof File ) { - directory= (File) selected; - } - if ( selected instanceof IFile ) { - directory = directory.getParentFile(); - } - if ( selected instanceof File ) { - directory = directory.getParentFile(); - } String target = EasyExplorePlugin.getDefault().getTarget(); ! ! if (!EasyExplorePlugin.getDefault().isSupported()) { ! MessageDialog.openInformation(new Shell(),"Easy Explore", ! "This platform (" + ! System.getProperty("os.name") + ! ") is currently unsupported.\n" + ! "You can try to provide the correct command to execute in the Preference dialog.\n" + ! "If you succeed, please be kind to post your discovery on EasyExplore website http://sourceforge.net/projects/easystruts,\n" + ! "or by email far...@us.... Thanks !"); ! return; ! } ! ! if ( target.indexOf("{0}") == -1 ) { ! target = target.trim() + " {0}"; ! } ! ! target = MessageFormat.format(target, new String[]{directory.toString()}); ! ! try { ! EasyExplorePlugin.log("running: "+target); ! Runtime.getRuntime().exec(target); ! } catch ( Throwable t ) { ! MessageDialog.openInformation(new Shell(),"Easy Explore","Unable to execute " +target); ! EasyExplorePlugin.log(t); ! } ! } catch (Throwable e) { ! EasyExplorePlugin.log(e); ! } ! } ! ! /** ! * @see IActionDelegate#selectionChanged(IAction, ISelection) ! */ ! public void selectionChanged(IAction action, ISelection selection) { ! try { ! IAdaptable adaptable = null; ! this.selected = "unknown"; ! if ( selection instanceof IStructuredSelection ) { ! adaptable = (IAdaptable) ((IStructuredSelection)selection).getFirstElement(); ! this.selectedClass = adaptable.getClass(); ! if ( adaptable instanceof IResource ) { ! this.selected = (IResource) adaptable; ! } else if ( adaptable instanceof PackageFragment && ((PackageFragment)adaptable).getPackageFragmentRoot() instanceof JarPackageFragmentRoot ) { ! this.selected = getJarFile(((PackageFragment)adaptable).getPackageFragmentRoot()); ! } else if ( adaptable instanceof JarPackageFragmentRoot ) { ! this.selected = getJarFile(adaptable); ! } else { ! this.selected = (IResource) adaptable.getAdapter(IResource.class); ! } ! } } catch (Throwable e) { EasyExplorePlugin.log(e); } } - - protected File getJarFile(IAdaptable adaptable) { - JarPackageFragmentRoot jpfr = (JarPackageFragmentRoot) adaptable; - File selected = (File) jpfr.getPath().makeAbsolute().toFile(); - if ( !((File)selected).exists() ) { - File projectFile = new File(jpfr.getJavaProject().getProject().getLocation().toOSString()); - selected = new File( projectFile.getParent() + selected.toString() ); - } - return selected; - } - } --- 1,18 ---- package org.sf.easyexplore.actions; import org.eclipse.jface.action.IAction; ! import org.eclipse.ui.IActionDelegate; import org.eclipse.ui.IObjectActionDelegate; ! import org.sf.easyexplore.EasyExplorePlugin; ! public class EasyExploreAction extends EasyBaseAction { ! public void runAction(IAction action) { try { String target = EasyExplorePlugin.getDefault().getTarget(); ! run(action, target); } catch (Throwable e) { EasyExplorePlugin.log(e); } } } --- NEW FILE: EasyBaseAction.java --- package org.sf.easyexplore.actions; import java.io.File; import java.text.MessageFormat; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jdt.internal.core.JarPackageFragmentRoot; import org.eclipse.jdt.internal.core.PackageFragment; import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IActionDelegate; import org.eclipse.ui.IObjectActionDelegate; import org.eclipse.ui.IWorkbenchPart; import org.sf.easyexplore.EasyExplorePlugin; public abstract class EasyBaseAction implements IObjectActionDelegate { private Object selected = null; private Class selectedClass = null; /** * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) */ public void setActivePart(IAction action, IWorkbenchPart targetPart) { } /** * @see IActionDelegate#run(IAction) */ public void run(IAction action) { runAction(action); } public abstract void runAction(IAction action) ; public void run(IAction action, String target) { try { if ("unknown".equals(selected)) { MessageDialog.openInformation(new Shell(), "EasyExplore", "Unable to run command " + selectedClass.getName()); EasyExplorePlugin.log("Unable to run command " + selectedClass); return; } File directory = null; if (selected instanceof IResource) { directory = new File(((IResource) selected).getLocation() .toOSString()); } else if (selected instanceof File) { directory = (File) selected; } if (selected instanceof IFile) { directory = directory.getParentFile(); } if (selected instanceof File) { directory = directory.getParentFile(); } if (!EasyExplorePlugin.getDefault().isSupported()) { MessageDialog .openInformation( new Shell(), "EasyExplore", "This platform (" + System.getProperty("os.name") + ") is currently unsupported.\n" + "You can try to provide the correct explorer and command to execute in the Preference dialog.\n" + "If you succeed, please be kind to post your discovery on EasyExplore website http://sourceforge.net/projects/easystruts,\n" + "or by email far...@us.... Thanks !"); } if (target.indexOf("{0}") == -1) { target = target.trim() + " {0}"; } target = MessageFormat.format(target, new String[] { directory .toString() }); try { EasyExplorePlugin.log("running: " + target); Runtime.getRuntime().exec(target); } catch (Throwable t) { MessageDialog.openInformation(new Shell(), "EasyExplore", "Unable to execute " + target); EasyExplorePlugin.log(t); } } catch (Throwable e) { EasyExplorePlugin.log(e); } } /** * @see IActionDelegate#selectionChanged(IAction, ISelection) */ public void selectionChanged(IAction action, ISelection selection) { try { IAdaptable adaptable = null; this.selected = "unknown"; if (selection instanceof IStructuredSelection) { adaptable = (IAdaptable) ((IStructuredSelection) selection) .getFirstElement(); this.selectedClass = adaptable.getClass(); if (adaptable instanceof IResource) { this.selected = (IResource) adaptable; } else if (adaptable instanceof PackageFragment && ((PackageFragment) adaptable) .getPackageFragmentRoot() instanceof JarPackageFragmentRoot) { this.selected = getJarFile(((PackageFragment) adaptable) .getPackageFragmentRoot()); } else if (adaptable instanceof JarPackageFragmentRoot) { this.selected = getJarFile(adaptable); } else { this.selected = (IResource) adaptable .getAdapter(IResource.class); } } } catch (Throwable e) { EasyExplorePlugin.log(e); } } protected File getJarFile(IAdaptable adaptable) { JarPackageFragmentRoot jpfr = (JarPackageFragmentRoot) adaptable; File selected = (File) jpfr.getPath().makeAbsolute().toFile(); if (!((File) selected).exists()) { File projectFile = new File(jpfr.getJavaProject().getProject() .getLocation().toOSString()); selected = new File(projectFile.getParent() + selected.toString()); } return selected; } } --- NEW FILE: EasyCommandAction.java --- package org.sf.easyexplore.actions; import org.eclipse.jface.action.IAction; import org.eclipse.ui.IActionDelegate; import org.sf.easyexplore.EasyExplorePlugin; public class EasyCommandAction extends EasyBaseAction { /** * @see IActionDelegate#run(IAction) */ public void runAction(IAction action) { try { String target = EasyExplorePlugin.getDefault().getCommand(); run(action, target); } catch (Throwable e) { EasyExplorePlugin.log(e); } } } |
From: Philippe O. <pom...@us...> - 2006-01-27 02:31:20
|
Update of /cvsroot/easystruts/org.sf.easyexplore/icon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29857/icon Modified Files: easyexplore.gif Added Files: easycommand.gif Log Message: A small upgrade to run also a comamnd and get the right default command on windows... I use it all the time. Index: easyexplore.gif =================================================================== RCS file: /cvsroot/easystruts/org.sf.easyexplore/icon/easyexplore.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsrUtW7N and /tmp/cvsa1R1D0 differ --- NEW FILE: easycommand.gif --- (This appears to be a binary file; contents omitted.) |
From: Philippe O. <pom...@us...> - 2006-01-27 02:31:20
|
Update of /cvsroot/easystruts/org.sf.easyexplore In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29857 Modified Files: plugin.xml build.properties Log Message: A small upgrade to run also a comamnd and get the right default command on windows... I use it all the time. Index: build.properties =================================================================== RCS file: /cvsroot/easystruts/org.sf.easyexplore/build.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.properties 26 Jan 2006 20:37:56 -0000 1.1 --- build.properties 27 Jan 2006 02:31:11 -0000 1.2 *************** *** 3,5 **** .,\ plugin.properties,\ ! plugin.xml --- 3,9 ---- .,\ plugin.properties,\ ! plugin.xml,\ ! icon/,\ ! README.TXT,\ ! LICENSE.txt ! src.includes = icon/ Index: plugin.xml =================================================================== RCS file: /cvsroot/easystruts/org.sf.easyexplore/plugin.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** plugin.xml 26 Jan 2006 20:37:56 -0000 1.1 --- plugin.xml 27 Jan 2006 02:31:11 -0000 1.2 *************** *** 22,32 **** </or> </visibility> ! <action label="Easy Explore..." icon="icon/easyexplore.gif" ! class="org.sf.easyexplore.actions.EasyExploreAction" ! menubarPath="additions" enablesFor="1" ! id="org.sf.easyexplore.actions.EasyExploreAction"> ! </action> </objectContribution> </extension> </plugin> \ No newline at end of file --- 22,74 ---- </or> </visibility> ! <action ! class="org.sf.easyexplore.actions.EasyExploreAction" ! definitionId="org.sf.easyexplore.actions.EasyExploreCommand" ! enablesFor="1" ! icon="icon/easyexplore.gif" ! id="org.sf.easyexplore.actions.EasyExploreAction" ! label="Easy explore here..." ! menubarPath="additions"> ! </action> ! <action ! class="org.sf.easyexplore.actions.EasyCommandAction" ! definitionId="org.sf.easyexplore.actions.EasyCommandCommand" ! enablesFor="1" ! icon="icon/easycommand.gif" ! id="org.sf.easyexplore.actions.EasyCommandAction" ! label="Easy command here..." ! menubarPath="additions"> </action> </objectContribution> </extension> + <extension + point="org.eclipse.ui.bindings"> + <key + commandId="org.sf.easyexplore.actions.EasyCommandCommand" + contextId="org.eclipse.ui.contexts.dialogAndWindow" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" + sequence="M1+M2+A"/> + <key + commandId="org.sf.easyexplore.actions.EasyExploreCommand" + contextId="org.eclipse.ui.contexts.dialogAndWindow" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" + sequence="M1+M2+Q"/> + </extension> + <extension + point="org.eclipse.ui.commands"> + <category + description="Open an Explorer and a command prompt" + id="org.sf.easyexplore.category" + name="EasyExplore"/> + <command + categoryId="org.sf.easyexplore.category" + description="Execute a system command on a file" + id="org.sf.easyexplore.actions.EasyCommandCommand" + name="EasyCommand"/> + <command + categoryId="org.sf.easyexplore.category" + description="Open a file explorer on a file" + id="org.sf.easyexplore.actions.EasyExploreCommand" + name="EasyExplore"/> + </extension> </plugin> \ No newline at end of file |
From: Philippe O. <pom...@us...> - 2006-01-27 02:31:20
|
Update of /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/preferences In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29857/src/org/sf/easyexplore/preferences Modified Files: EasyExplorePreferencePage.java Log Message: A small upgrade to run also a comamnd and get the right default command on windows... I use it all the time. Index: EasyExplorePreferencePage.java =================================================================== RCS file: /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/preferences/EasyExplorePreferencePage.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyExplorePreferencePage.java 26 Jan 2006 20:37:56 -0000 1.1 --- EasyExplorePreferencePage.java 27 Jan 2006 02:31:10 -0000 1.2 *************** *** 1,5 **** package org.sf.easyexplore.preferences; - import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.StringFieldEditor; --- 1,4 ---- *************** *** 8,40 **** import org.sf.easyexplore.EasyExplorePlugin; - /** * Preference for program used by Easy Explore */ ! public class EasyExplorePreferencePage ! extends FieldEditorPreferencePage ! implements IWorkbenchPreferencePage { public static final String P_TARGET = "org.sf.easyexplore.targetPreference"; public EasyExplorePreferencePage() { super(GRID); setPreferenceStore(EasyExplorePlugin.getDefault().getPreferenceStore()); ! setDescription("Set up your file explorer application."); ! } /** ! * Creates the field editors. Field editors are abstractions of ! * the common GUI blocks needed to manipulate various types ! * of preferences. Each field editor knows how to save and ! * restore itself. ! */ public void createFieldEditors() { ! addField( ! new StringFieldEditor(P_TARGET, "&Target:", getFieldEditorParent())); ! } ! public void init(IWorkbench workbench) { } --- 7,39 ---- import org.sf.easyexplore.EasyExplorePlugin; /** * Preference for program used by Easy Explore */ ! public class EasyExplorePreferencePage extends FieldEditorPreferencePage ! implements IWorkbenchPreferencePage { public static final String P_TARGET = "org.sf.easyexplore.targetPreference"; + public static final String P_COMMAND = "org.sf.easyexplore.commandPreference"; + public EasyExplorePreferencePage() { super(GRID); setPreferenceStore(EasyExplorePlugin.getDefault().getPreferenceStore()); ! setDescription("Configure your explorer application and command to run."); ! } /** ! * Creates the field editors. Field editors are abstractions of the common ! * GUI blocks needed to manipulate various types of preferences. Each field ! * editor knows how to save and restore itself. ! */ public void createFieldEditors() { ! addField(new StringFieldEditor(P_TARGET, "&Explorer:", ! getFieldEditorParent())); ! addField(new StringFieldEditor(P_COMMAND, "&Command:", ! getFieldEditorParent())); } ! public void init(IWorkbench workbench) { } |
From: Philippe O. <pom...@us...> - 2006-01-26 20:38:12
|
Update of /cvsroot/easystruts/org.sf.easyexplore/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5339/META-INF Added Files: MANIFEST.MF Log Message: Renamed CVS module to match plugin id --- NEW FILE: MANIFEST.MF --- Manifest-Version: 1.0 Bundle-Name: %pluginName Bundle-SymbolicName: org.sf.easyexplore; singleton=true Bundle-Version: 1.1.0 Bundle-Vendor: %providerName Bundle-ClassPath: . Bundle-Activator: easyexplore.jar Bundle-Localization: plugin Require-Bundle: org.eclipse.core.runtime.compatibility, org.eclipse.ui.ide, org.eclipse.ui.views, org.eclipse.jface.text, org.eclipse.ui.workbench.texteditor, org.eclipse.ui.editors, org.eclipse.core.resources, org.eclipse.ui, org.eclipse.jdt.core Eclipse-AutoStart: true Plugin-Class: org.sf.easyexplore.EasyExplorePlugin |
From: Philippe O. <pom...@us...> - 2006-01-26 20:38:12
|
Update of /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/preferences In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5339/src/org/sf/easyexplore/preferences Added Files: EasyExplorePreferencePage.java Log Message: Renamed CVS module to match plugin id --- NEW FILE: EasyExplorePreferencePage.java --- package org.sf.easyexplore.preferences; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.StringFieldEditor; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; import org.sf.easyexplore.EasyExplorePlugin; /** * Preference for program used by Easy Explore */ public class EasyExplorePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { public static final String P_TARGET = "org.sf.easyexplore.targetPreference"; public EasyExplorePreferencePage() { super(GRID); setPreferenceStore(EasyExplorePlugin.getDefault().getPreferenceStore()); setDescription("Set up your file explorer application."); } /** * Creates the field editors. Field editors are abstractions of * the common GUI blocks needed to manipulate various types * of preferences. Each field editor knows how to save and * restore itself. */ public void createFieldEditors() { addField( new StringFieldEditor(P_TARGET, "&Target:", getFieldEditorParent())); } public void init(IWorkbench workbench) { } } |
From: Philippe O. <pom...@us...> - 2006-01-26 20:38:12
|
Update of /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5339/src/org/sf/easyexplore Added Files: EasyExplorePlugin.java Log Message: Renamed CVS module to match plugin id --- NEW FILE: EasyExplorePlugin.java --- package org.sf.easyexplore; import java.io.PrintWriter; import java.io.StringWriter; import java.util.MissingResourceException; import java.util.ResourceBundle; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.ILog; import org.eclipse.core.runtime.IPluginDescriptor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.sf.easyexplore.preferences.EasyExplorePreferencePage; /** * The main plugin class to be used in the desktop. */ public class EasyExplorePlugin extends AbstractUIPlugin { //The shared instance. private static EasyExplorePlugin plugin; //Resource bundle. private ResourceBundle resourceBundle; /** * The constructor. */ public EasyExplorePlugin(IPluginDescriptor descriptor) { super(descriptor); plugin = this; try { resourceBundle= ResourceBundle.getBundle("org.sf.easyexplore.EasyExplorePluginResources"); } catch (MissingResourceException x) { // throw new NullPointerException("unnable to load resources org.sf.easyexplore.EasyExplorePluginResources"); } } /** * Returns the shared instance. */ public static EasyExplorePlugin getDefault() { return plugin; } /** * Returns the workspace instance. */ public static IWorkspace getWorkspace() { return ResourcesPlugin.getWorkspace(); } /** * Returns the string from the plugin's resource bundle, * or 'key' if not found. */ public static String getResourceString(String key) { ResourceBundle bundle= EasyExplorePlugin.getDefault().getResourceBundle(); String res = null; try { res = bundle.getString(key); } catch (MissingResourceException e) { res = key; } return res; } /** * Returns the plugin's resource bundle, */ public ResourceBundle getResourceBundle() { return resourceBundle; } static public void log(Object msg) { ILog log = EasyExplorePlugin.getDefault().getLog(); Status status = new Status(IStatus.INFO, EasyExplorePlugin.getDefault().getDescriptor().getUniqueIdentifier(), IStatus.ERROR, msg + "\n", null); log.log(status); } static public void log(Throwable ex) { ILog log = EasyExplorePlugin.getDefault().getLog(); StringWriter stringWriter = new StringWriter(); ex.printStackTrace(new PrintWriter(stringWriter)); String msg = stringWriter.getBuffer().toString(); Status status = new Status(IStatus.ERROR, EasyExplorePlugin.getDefault().getDescriptor().getUniqueIdentifier(), IStatus.ERROR, msg, null); log.log(status); } /** * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore) */ protected void initializeDefaultPreferences(IPreferenceStore store) { String defaultTarget = "shell_open_command {0}"; String osName = System.getProperty("os.name"); if ( osName.indexOf("Windows") != -1 ) { defaultTarget = "explorer.exe {0}"; } else if ( osName.indexOf("Mac") != -1 ) { defaultTarget = "open {0}"; } store.setDefault(EasyExplorePreferencePage.P_TARGET, defaultTarget); } /** * Return the target program setted in EasyExplorePreferencePage. * @return String */ public String getTarget() { return getPreferenceStore().getString(EasyExplorePreferencePage.P_TARGET); } /** * Tells whether this platform is currently supported. * The implementation of this method must be in sync with the implementation of * <a href="#initializeDefaultPreferences(IPreferenceStore)">initializeDefaultPreferences(IPreferenceStore)</a>. */ public boolean isSupported() { String osName = System.getProperty("os.name"); return (( osName.indexOf("Windows") != -1 ) || ( osName.indexOf("Mac") != -1 )); } } |
From: Philippe O. <pom...@us...> - 2006-01-26 20:38:12
|
Update of /cvsroot/easystruts/org.sf.easyexplore/icon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5339/icon Added Files: easyexplore.gif Log Message: Renamed CVS module to match plugin id --- NEW FILE: easyexplore.gif --- (This appears to be a binary file; contents omitted.) |
From: Philippe O. <pom...@us...> - 2006-01-26 20:38:11
|
Update of /cvsroot/easystruts/org.sf.easyexplore In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5339 Added Files: plugin.xml .classpath .cvsignore README.TXT plugin.properties build.properties .template screenshot.gif .project LICENSE.txt project.xml Log Message: Renamed CVS module to match plugin id --- NEW FILE: .cvsignore --- org.sf.easyexplore_1.0.0.zip org.sf.easyexplore_1.0.1 temp.folder bin --- NEW FILE: .project --- <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>org.sf.easyexplore</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.pde.ManifestBuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.pde.SchemaBuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.pde.PluginNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription> --- NEW FILE: .classpath --- <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="src" path="src"/> <classpathentry kind="output" path="bin"/> </classpath> --- NEW FILE: screenshot.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: .template --- <?xml version="1.0" encoding="UTF-8"?> <form> <p><b>Generated content</b></p><p>This plug-in has been created using content templates. The following templates were used:</p> <li style="text" value="1."><b>Sample Popup Menu.</b>This template adds a submenu and a new action to a target object's popup menu. This contribution will appear in all viewers where an object of the specified type is selected.</li> <p/><p><b>Tips on working with this plug-in project</b></p><li>For the view of the new plug-in at a glance, go to the <img href="pageImage"/><a href="OverviewPage">Overview</a>.</li><li>You can test the contributions of this plug-in by launching another instance of the workbench. On the <b>Run</b> menu, click <b>Run As</b> and choose <img href="runTimeWorkbenchImage"/><a href="action.run">Run-time Workbench</a> from the available choices.</li><li>You can add more functionality to this plug-in by adding extensions using the <a href="action.newExtension">New Extension Wizard</a>.</li><li>The plug-in project contains Java code that you can debug. Place breakpoints in Java classes. On the <b>Run</b> menu, select <b>Debug As</b> and choose <img href="runTimeWorkbenchImage"/><a href="action.debug">Run-time Workbench</a> from the available choices.</li> </form> --- NEW FILE: project.xml --- <?xml version="1.0" encoding="UTF-8"?> <project> <extend>../easystruts/project.xml</extend> <pomVersion>3</pomVersion> <groupId>maven</groupId> <id>maven-eclipsepde-plugin</id> <name>Maven Eclipse PDE Plugin</name> <currentVersion>1.0-SNAPSHOT</currentVersion> <description>Eclipse PDE plugin for Maven</description> <shortDescription>Eclipse PDE plugin for Maven</shortDescription> <developers> <developer> <name>Emmanuel Boudrant</name> <id>eboudrant</id> <email>emm...@fr...</email> <roles> <role>Java Developer</role> </roles> </developer> </developers> <dependencies> <dependency> <groupId>eclipse</groupId> <artifactId>eclipse</artifactId> <version>SNAPSHOT</version> <type>jar</type> </dependency> </dependencies> <build> <sourceDirectory>src/java</sourceDirectory> <unitTestSourceDirectory>src/test</unitTestSourceDirectory> <unitTest> <includes> <include>**/*Test.java</include> </includes> </unitTest> </build> </project> --- NEW FILE: plugin.xml --- <?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.0"?> <plugin> <extension point="org.eclipse.ui.preferencePages"> <page name="Easy Explore" class="org.sf.easyexplore.preferences.EasyExplorePreferencePage" id="org.sf.asyexplore.preferences.EasyExplorePreferencePage"> </page> </extension> <extension point="org.eclipse.ui.popupMenus"> <objectContribution objectClass="org.eclipse.core.runtime.IAdaptable" id="org.sf.easyexplore.contribution"> <visibility> <or> <objectClass name="org.eclipse.core.resources.IResource" /> <objectClass name="org.eclipse.ui.model.IWorkbenchAdapter" /> <objectClass name="org.eclipse.jdt.core.ICompilationUnit" /> </or> </visibility> <action label="Easy Explore..." icon="icon/easyexplore.gif" class="org.sf.easyexplore.actions.EasyExploreAction" menubarPath="additions" enablesFor="1" id="org.sf.easyexplore.actions.EasyExploreAction"> </action> </objectContribution> </extension> </plugin> --- NEW FILE: plugin.properties --- pluginName = Easy Explore providerName = Emmanuel Boudrant and the EasyStruts team --- NEW FILE: LICENSE.txt --- /* * ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2006 Emmanuel Boudrant, Cross Systems, nexB Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * EasyStruts project team (http://easystruts.sf.net)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "EsayStruts", "EasyExplore", "nexB", "Struts", and * "EasyEclipse" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact in...@ne.... * * 5. Products derived from this software may not be called "EasyStruts" * nor may "EasyStruts" appear in their names without prior written * permission of the EasyStruts project team. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== */ --- NEW FILE: build.properties --- source.. = src/ bin.includes = META-INF/,\ .,\ plugin.properties,\ plugin.xml --- NEW FILE: README.TXT --- Easy Explorer 1.1.0 plugin for Eclipse -------------------------------------------------------------- This little plugin helps you to browse resources with the 'Explorer' of your platform from Eclipse package explorer or resource navigators. Just select a resource and launch the [Easy Explore...] menu item from this resources context pop-up menu. You can setup your preferred browser or finder program in Eclipse preferences. This plugin has been tested on win32, linux and MacOSX panther and Tiger platforms. -the EasyStruts team |
From: Philippe O. <pom...@us...> - 2006-01-26 20:38:09
|
Update of /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5339/src/org/sf/easyexplore/actions Added Files: EasyExploreAction.java Log Message: Renamed CVS module to match plugin id --- NEW FILE: EasyExploreAction.java --- package org.sf.easyexplore.actions; import java.io.File; import java.text.MessageFormat; import org.sf.easyexplore.EasyExplorePlugin; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jdt.internal.core.JarPackageFragmentRoot; import org.eclipse.jdt.internal.core.PackageFragment; import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IObjectActionDelegate; import org.eclipse.ui.IWorkbenchPart; public class EasyExploreAction implements IObjectActionDelegate { private Object selected=null; private Class selectedClass=null; /** * Constructor for EasyExploreAction. */ public EasyExploreAction() { super(); } /** * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) */ public void setActivePart(IAction action, IWorkbenchPart targetPart) { } /** * @see IActionDelegate#run(IAction) */ public void run(IAction action) { try { if ( "unknown".equals(selected) ) { MessageDialog.openInformation(new Shell(),"Easy Explore","Unable to explore " + selectedClass.getName()); EasyExplorePlugin.log("Unable to explore " + selectedClass); return; } File directory = null; if ( selected instanceof IResource ) { directory= new File(((IResource)selected).getLocation().toOSString()); } else if ( selected instanceof File ) { directory= (File) selected; } if ( selected instanceof IFile ) { directory = directory.getParentFile(); } if ( selected instanceof File ) { directory = directory.getParentFile(); } String target = EasyExplorePlugin.getDefault().getTarget(); if (!EasyExplorePlugin.getDefault().isSupported()) { MessageDialog.openInformation(new Shell(),"Easy Explore", "This platform (" + System.getProperty("os.name") + ") is currently unsupported.\n" + "You can try to provide the correct command to execute in the Preference dialog.\n" + "If you succeed, please be kind to post your discovery on EasyExplore website http://sourceforge.net/projects/easystruts,\n" + "or by email far...@us.... Thanks !"); return; } if ( target.indexOf("{0}") == -1 ) { target = target.trim() + " {0}"; } target = MessageFormat.format(target, new String[]{directory.toString()}); try { EasyExplorePlugin.log("running: "+target); Runtime.getRuntime().exec(target); } catch ( Throwable t ) { MessageDialog.openInformation(new Shell(),"Easy Explore","Unable to execute " +target); EasyExplorePlugin.log(t); } } catch (Throwable e) { EasyExplorePlugin.log(e); } } /** * @see IActionDelegate#selectionChanged(IAction, ISelection) */ public void selectionChanged(IAction action, ISelection selection) { try { IAdaptable adaptable = null; this.selected = "unknown"; if ( selection instanceof IStructuredSelection ) { adaptable = (IAdaptable) ((IStructuredSelection)selection).getFirstElement(); this.selectedClass = adaptable.getClass(); if ( adaptable instanceof IResource ) { this.selected = (IResource) adaptable; } else if ( adaptable instanceof PackageFragment && ((PackageFragment)adaptable).getPackageFragmentRoot() instanceof JarPackageFragmentRoot ) { this.selected = getJarFile(((PackageFragment)adaptable).getPackageFragmentRoot()); } else if ( adaptable instanceof JarPackageFragmentRoot ) { this.selected = getJarFile(adaptable); } else { this.selected = (IResource) adaptable.getAdapter(IResource.class); } } } catch (Throwable e) { EasyExplorePlugin.log(e); } } protected File getJarFile(IAdaptable adaptable) { JarPackageFragmentRoot jpfr = (JarPackageFragmentRoot) adaptable; File selected = (File) jpfr.getPath().makeAbsolute().toFile(); if ( !((File)selected).exists() ) { File projectFile = new File(jpfr.getJavaProject().getProject().getLocation().toOSString()); selected = new File( projectFile.getParent() + selected.toString() ); } return selected; } } |
From: Philippe O. <pom...@us...> - 2006-01-26 20:38:05
|
Update of /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5252/src/org/sf/easyexplore/actions Log Message: Directory /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/actions added to the repository |
From: Philippe O. <pom...@us...> - 2006-01-26 20:38:02
|
Update of /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/preferences In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5252/src/org/sf/easyexplore/preferences Log Message: Directory /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore/preferences added to the repository |
From: Philippe O. <pom...@us...> - 2006-01-26 20:38:01
|
Update of /cvsroot/easystruts/org.sf.easyexplore/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5252/src Log Message: Directory /cvsroot/easystruts/org.sf.easyexplore/src added to the repository |
From: Philippe O. <pom...@us...> - 2006-01-26 20:38:01
|
Update of /cvsroot/easystruts/org.sf.easyexplore/icon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5252/icon Log Message: Directory /cvsroot/easystruts/org.sf.easyexplore/icon added to the repository |
From: Philippe O. <pom...@us...> - 2006-01-26 20:38:01
|
Update of /cvsroot/easystruts/org.sf.easyexplore/src/org/sf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5252/src/org/sf Log Message: Directory /cvsroot/easystruts/org.sf.easyexplore/src/org/sf added to the repository |
From: Philippe O. <pom...@us...> - 2006-01-26 20:38:00
|
Update of /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5252/src/org/sf/easyexplore Log Message: Directory /cvsroot/easystruts/org.sf.easyexplore/src/org/sf/easyexplore added to the repository |
From: Philippe O. <pom...@us...> - 2006-01-26 20:37:59
|
Update of /cvsroot/easystruts/org.sf.easyexplore/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5252/META-INF Log Message: Directory /cvsroot/easystruts/org.sf.easyexplore/META-INF added to the repository |
From: Philippe O. <pom...@us...> - 2006-01-26 20:37:59
|
Update of /cvsroot/easystruts/org.sf.easyexplore/src/org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5252/src/org Log Message: Directory /cvsroot/easystruts/org.sf.easyexplore/src/org added to the repository |
From: Philippe O. <pom...@us...> - 2006-01-26 20:37:37
|
Update of /cvsroot/easystruts/org.sf.easyexplore In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5177/org.sf.easyexplore Log Message: Directory /cvsroot/easystruts/org.sf.easyexplore added to the repository |
From: Philippe O. <pom...@us...> - 2006-01-26 20:36:53
|
Update of /cvsroot/easystruts/easyexplore-plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4850 Added Files: LICENSE.txt Log Message: Updated (missing license) --- NEW FILE: LICENSE.txt --- /* * ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2006 Emmanuel Boudrant, Cross Systems, nexB Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * EasyStruts project team (http://easystruts.sf.net)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "EsayStruts", "EasyExplore", "nexB", "Struts", and * "EasyEclipse" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact in...@ne.... * * 5. Products derived from this software may not be called "EasyStruts" * nor may "EasyStruts" appear in their names without prior written * permission of the EasyStruts project team. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== */ |