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 84851 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]
fix
fix_211045.txt (text/plain), 7.54 KB, created by
Benno Baumgartner
on 2007-12-10 04:18:05 EST
(
hide
)
Description:
fix
Filename:
MIME Type:
Creator:
Benno Baumgartner
Created:
2007-12-10 04:18:05 EST
Size:
7.54 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >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 10 Dec 2007 09:17:46 -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; > >@@ -81,7 +83,11 @@ > public abstract ILaunchConfiguration getLaunchConfiguration(); > > public abstract String getLaunchConfigurationName(); >+ >+ public abstract boolean hasProgramArguments(); > >+ public abstract boolean hasVMArguments(); >+ > public void dispose() { > //do nothing > } >@@ -117,6 +123,24 @@ > return result.toString(); > } > >+ public boolean hasProgramArguments() { >+ try { >+ return fLaunchConfiguration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String) null) != null; >+ } catch (CoreException e) { >+ JavaPlugin.log(e); >+ return false; >+ } >+ } >+ >+ public boolean hasVMArguments() { >+ try { >+ return fLaunchConfiguration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, (String) null) != null; >+ } catch (CoreException e) { >+ JavaPlugin.log(e); >+ return false; >+ } >+ } >+ > } > > private static final String PAGE_NAME= "FatJarPackageWizardPage"; //$NON-NLS-1$ >@@ -198,17 +222,47 @@ > } > > public boolean isPageComplete() { >+ clearMessages(); > boolean complete= validateDestinationGroup(); > complete= validateLaunchConfigurationGroup() && complete; >- if (complete) >- setErrorMessage(null); > return complete; > } > > private boolean validateLaunchConfigurationGroup() { >- return fLaunchConfigurationCombo.getSelectionIndex() != -1; >+ int index= fLaunchConfigurationCombo.getSelectionIndex(); >+ if (index == -1) >+ return false; >+ >+ LaunchConfigurationElement element= (LaunchConfigurationElement) fLauchConfigurationModel.get(index); >+ if (element.hasProgramArguments()) >+ setWarningMessage(FatJarPackagerMessages.FatJarPackageWizardPage_warning_launchConfigContainsProgramArgs); >+ >+ if (element.hasVMArguments()) >+ 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.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 10 Dec 2007 09:17:46 -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/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 10 Dec 2007 09:17:46 -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