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 84806 Details for
Bug 211045
[jar exporter] program arguments are ignored
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch3 for org.eclipse.jdt.ui, show info for launchconfigs with arguments
fix_211045c.txt (text/plain), 7.76 KB, created by
Ferenc Hechler
on 2007-12-08 09:58:40 EST
(
hide
)
Description:
patch3 for org.eclipse.jdt.ui, show info for launchconfigs with arguments
Filename:
MIME Type:
Creator:
Ferenc Hechler
Created:
2007-12-08 09:58:40 EST
Size:
7.76 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackagerMessages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackagerMessages.properties,v >retrieving revision 1.1 >diff -u -r1.1 FatJarPackagerMessages.properties >--- ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackagerMessages.properties 26 Nov 2007 13:57:10 -0000 1.1 >+++ ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackagerMessages.properties 8 Dec 2007 14:55:27 -0000 >@@ -8,6 +8,7 @@ > # Contributors: > # IBM Corporation - initial API and implementation > # Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 83258 [jar exporter] Deploy java application as executable jar >+# Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 211045 [jar application] program arguments are ignored > ############################################################################### > > JarPackageWizard_windowTitle= Runnable JAR File Export >@@ -26,6 +27,8 @@ > FatJarPackageWizardPage_error_missingClassFile=Fat Jar Export: Could not find classpath entry for ''{0}'' > FatJarPackageWizard_IPIssueDialog_message=This operation does repack libraries. Make sure you have the required legal rights to do so. > FatJarPackageWizard_IPIssueDialog_title=Runnable JAR File Export >+FatJarPackageWizardPage_warning_launchConfigContainsProgramArgs=Program arguments will not be part of the runnable JAR. Arguments can be passed on the command line when launching the JAR >+FatJarPackageWizardPage_warning_launchConfigContainsVMArgs=VM arguments will not be part of the runnable JAR. Arguments can be passed on the command line when launching the JAR > FatJarPackageWizardPage_error_noMainMethod=Could not find main method from given launch configuration. > FatJarPackageWizardPage_launchConfigGroupTitle=Select the launch configuration: > FatJarPackageWizardPage_LaunchConfigurationWithoutMainType_warning=The selected launch configuration has no type with a main method attached. The resulting jar will not be runnable. >Index: ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackageWizardPage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackageWizardPage.java,v >retrieving revision 1.1 >diff -u -r1.1 FatJarPackageWizardPage.java >--- ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackageWizardPage.java 26 Nov 2007 13:57:10 -0000 1.1 >+++ ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackageWizardPage.java 8 Dec 2007 14:55:27 -0000 >@@ -8,6 +8,7 @@ > * Contributors: > * IBM Corporation - initial API and implementation > * Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 83258 [jar exporter] Deploy java application as executable jar >+ * Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 211045 [jar application] program arguments are ignored > *******************************************************************************/ > package org.eclipse.jdt.internal.ui.jarpackagerfat; > >@@ -39,6 +40,7 @@ > > import org.eclipse.jface.dialogs.Dialog; > import org.eclipse.jface.dialogs.IDialogSettings; >+import org.eclipse.jface.dialogs.IMessageProvider; > import org.eclipse.jface.operation.IRunnableContext; > import org.eclipse.jface.viewers.IStructuredSelection; > >@@ -82,6 +84,10 @@ > > public abstract String getLaunchConfigurationName(); > >+ public abstract String getLaunchConfigurationProgramArguments(); >+ >+ public abstract String getLaunchConfigurationVMArguments(); >+ > public void dispose() { > //do nothing > } >@@ -117,6 +123,23 @@ > return result.toString(); > } > >+ public String getLaunchConfigurationProgramArguments() { >+ return getLaunchConfigurationAttibute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""); //$NON-NLS-1$ >+ } >+ >+ public String getLaunchConfigurationVMArguments() { >+ return getLaunchConfigurationAttibute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""); //$NON-NLS-1$ >+ } >+ >+ private String getLaunchConfigurationAttibute(String attributeName, String defaultValue) { >+ try { >+ return fLaunchConfiguration.getAttribute(attributeName, defaultValue); >+ } catch (CoreException e) { >+ JavaPlugin.log(e); >+ return defaultValue; >+ } >+ } >+ > } > > private static final String PAGE_NAME= "FatJarPackageWizardPage"; //$NON-NLS-1$ >@@ -198,17 +221,46 @@ > } > > public boolean isPageComplete() { >+ clearMessages(); > boolean complete= validateDestinationGroup(); > complete= validateLaunchConfigurationGroup() && complete; >- if (complete) >- setErrorMessage(null); > return complete; > } > > private boolean validateLaunchConfigurationGroup() { >- return fLaunchConfigurationCombo.getSelectionIndex() != -1; >+ int lcIdx= fLaunchConfigurationCombo.getSelectionIndex(); >+ if (lcIdx == -1) >+ return false; >+ LaunchConfigurationElement element= (LaunchConfigurationElement) fLauchConfigurationModel.get(lcIdx); >+ String args= element.getLaunchConfigurationProgramArguments(); >+ if ((args != null) && (args.trim().length() > 0)) >+ setWarningMessage(FatJarPackagerMessages.FatJarPackageWizardPage_warning_launchConfigContainsProgramArgs); >+ args= element.getLaunchConfigurationVMArguments(); >+ if ((args != null) && (args.trim().length() > 0)) >+ setWarningMessage(FatJarPackagerMessages.FatJarPackageWizardPage_warning_launchConfigContainsVMArgs); >+ return true; > } > >+ /** >+ * clear all previously set messages and error-messages >+ */ >+ private void clearMessages() { >+ if (getErrorMessage() != null) >+ setErrorMessage(null); >+ if (getMessage() != null) >+ setMessage(null); >+ } >+ >+ /** >+ * set message to newMessage with severity WARNING. >+ * overwrite existing message only if it is beyond severity WARNING >+ * @param newMessage the warning to be set >+ */ >+ private void setWarningMessage(String newMessage) { >+ if ((getMessage() == null) || (getMessageType() < IMessageProvider.WARNING)) >+ setMessage(newMessage, IMessageProvider.WARNING); >+ } >+ > private LaunchConfigurationElement[] getLaunchConfigurations() { > ArrayList result= new ArrayList(); > >Index: ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackagerMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackagerMessages.java,v >retrieving revision 1.1 >diff -u -r1.1 FatJarPackagerMessages.java >--- ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackagerMessages.java 26 Nov 2007 13:57:10 -0000 1.1 >+++ ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackagerMessages.java 8 Dec 2007 14:55:27 -0000 >@@ -8,6 +8,7 @@ > * Contributors: > * IBM Corporation - initial API and implementation > * Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 83258 [jar exporter] Deploy java application as executable jar >+ * Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 211045 [jar application] program arguments are ignored > *******************************************************************************/ > package org.eclipse.jdt.internal.ui.jarpackagerfat; > >@@ -34,6 +35,8 @@ > > public static String FatJarPackageWizard_IPIssueDialog_title; > >+ public static String FatJarPackageWizardPage_warning_launchConfigContainsProgramArgs; >+ public static String FatJarPackageWizardPage_warning_launchConfigContainsVMArgs; > public static String FatJarPackageWizardPage_error_noMainMethod; > public static String FatJarPackageWizardPage_launchConfigGroupTitle; > public static String FatJarPackageWizardPage_LaunchConfigurationWithoutMainType_warning;
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 211045
:
84562
|
84643
|
84806
|
84851