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 29254 Details for
Bug 109880
Providing better means for the user to specify a workspace location
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]
Patches the AutoGUIExecObjAdapter to respect settings from the hyades .location view
patch-AutoGUIExecObjAdapter-deployment.pat (text/plain), 4.43 KB, created by
Simon Tuffs
on 2005-11-03 02:12:52 EST
(
hide
)
Description:
Patches the AutoGUIExecObjAdapter to respect settings from the hyades .location view
Filename:
MIME Type:
Creator:
Simon Tuffs
Created:
2005-11-03 02:12:52 EST
Size:
4.43 KB
patch
obsolete
>Index: AutoGUIExecObjAdapter.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.tptp.test.auto.gui/src/org/eclipse/tptp/test/auto/gui/internal/runner/AutoGUIExecObjAdapter.java,v >retrieving revision 1.2 >diff -u -r1.2 AutoGUIExecObjAdapter.java >--- AutoGUIExecObjAdapter.java 8 Sep 2005 20:09:05 -0000 1.2 >+++ AutoGUIExecObjAdapter.java 3 Nov 2005 07:07:52 -0000 >@@ -11,11 +11,15 @@ > **********************************************************************/ > package org.eclipse.tptp.test.auto.gui.internal.runner; > >+import org.eclipse.emf.common.util.EList; > import org.eclipse.hyades.execution.core.IExecutableObject; > import org.eclipse.hyades.execution.harness.IExecutableObjectAdapter; > import org.eclipse.hyades.execution.harness.XMLExecutionDataProcessor; > import org.eclipse.hyades.execution.local.JavaProcessExecutableObjectStub; > import org.eclipse.hyades.models.common.configuration.CFGClass; >+import org.eclipse.hyades.models.common.configuration.CFGComparableProperty; >+import org.eclipse.hyades.models.common.configuration.CFGConfigurableObject; >+import org.eclipse.hyades.models.common.configuration.CFGPropertyGroup; > import org.eclipse.hyades.models.common.facades.behavioral.IImplementor; > import org.eclipse.hyades.models.common.testprofile.TPFDeployment; > >@@ -27,6 +31,12 @@ > */ > public class AutoGUIExecObjAdapter implements IExecutableObjectAdapter > { >+ >+ // TODO: where are these strings really defined? >+ public static final String WORKSPACE_DIRECTORY = "workspaceDirectory"; >+ public static final String PROGRAM_ARGUMENTS = "programArguments"; >+ public static final String VM_ARGUMENTS = "vmArguments"; >+ > /** > * @see org.eclipse.hyades.execution.harness.IExecutableObjectAdapter#setupExecutableObject(org.eclipse.hyades.execution.core.IExecutableObject, org.eclipse.hyades.models.common.testprofile.TPFTestSuite, org.eclipse.hyades.models.common.testprofile.TPFTest) > */ >@@ -51,14 +61,54 @@ > jvmArgs += "-Dtptp.automated.gui.executor=" + XMLExecutionDataProcessor.IID + " "; > > /* The runner */ >- jvmArgs += "org.eclipse.core.launcher.Main -clean -data "; >- jvmArgs += "TPTP-Auto-Workspace-" + System.currentTimeMillis(); > >- //jvmArgs += "org.eclipse.hyades.test.tools.ui.auto.gui.internal.runner.RunnerWrapper "; >+ String workspaceDirectory = "TPTP-Auto-Workspace-" + System.currentTimeMillis(); >+ String programArguments = ""; >+ String vmArguments = ""; > >+ // NOTE: Code stolen from AutoGUIExecObjAdapter, seems like this >+ // should be consolidated into the TPFDeployment interface. > >+ // Dig out a workspaceDirectory, programArguments and vmArguments from the deployment. >+ EList locations = deployment.getRefLocations(); >+ boolean searchingForContext = true; >+ if (locations != null && locations.size() > 0) >+ { >+ /* For every location */ >+ OUTER: >+ for (int i = 0, locationSize = locations.size(); i < locationSize && searchingForContext; i++) >+ { >+ EList propertyGroups = ((CFGConfigurableObject)locations.get(i)).getPropertyGroups(); >+ /* For every property group */ >+ for (int j = 0, propertyGroupSize = propertyGroups.size(); j < propertyGroupSize && searchingForContext; j++) >+ { >+ EList properties = ((CFGPropertyGroup)propertyGroups.get(j)).getProperties(); >+ >+ /* For every property in a property group */ >+ for (int k = 0, propertiesSize = properties.size(); k < propertiesSize;k++) >+ { >+ CFGComparableProperty currentProperty = (CFGComparableProperty)properties.get(k); >+ String name = currentProperty.getName(); >+ String value = currentProperty.getValue(); >+ System.out.println("property=" + currentProperty.getName() + ",value=" + currentProperty.getValue()); >+ if (WORKSPACE_DIRECTORY.equals(name)) >+ { >+ workspaceDirectory = currentProperty.getValue() + " "; >+ } else if (PROGRAM_ARGUMENTS.equals(name)) { >+ programArguments = value + " "; >+ } else if (VM_ARGUMENTS.equals(name)) { >+ vmArguments = value + " "; >+ } >+ } >+ } >+ } >+ } >+ jvmArgs += vmArguments + "org.eclipse.core.launcher.Main -data " + workspaceDirectory + programArguments; >+ > objectStub.setArgs(jvmArgs); //$NON-NLS-1$ > >+ //jvmArgs += "org.eclipse.hyades.test.tools.ui.auto.gui.internal.runner.RunnerWrapper "; >+ > /* Send over the script */ > objectStub.setAgentData(theImplementor.getResource()); >
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 109880
: 29254