executed code and eclipse application test [message #373270] |
Wed, 29 July 2009 13:35 |
gloria guitteaud Messages: 14 Registered: July 2009 |
Junior Member |
|
|
Hello,
I've a plug-in project. I have the following class corresponding to a
command:
public class SampleHandler2 extends AbstractHandler {
/**
* The constructor.
*/
public SampleHandler2() {
}
private static String inputOutput(String message) {
System.out.println(message);
BufferedReader br = new BufferedReader(new
InputStreamReader(System.in));
String returnString = "";
try {
returnString = br.readLine();
}
catch (IOException e){
System.out.println("Error reading in value");
}
return returnString;}
/**
* the command has been executed, so extract extract the needed
information
* from the application context.
*/
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window =
HandlerUtil.getActiveWorkbenchWindowChecked(event);
try {
String classeCharge= inputOutput("Entrer le nom de fichier:");
System.out.println(classeCharge);
} catch (Exception e) {
System.out.println("Enter,...");
}
MessageDialog.openInformation(
window.getShell(),
"la classe a été chargée",
"Hello, Eclipse world");
try {
String modelCharge= inputOutput("Entrer le nom de fichier:");
System.out.println(modelCharge);
} catch (Exception e) {
System.out.println("Enter,...");
}
MessageDialog.openInformation(
window.getShell(),
"le model a été chargé",
"Hello, Eclipse world");
return null;
}
}
Then, when I launch an eclipse application test to test the plug-in, the
corresponding command to the class written above executes the code not in
the eclipse application test instance but in the basis instance of
eclipse.
I would like my code to be executed in the test instance as I click on the
test instance command.
Thank's
Gloria
|
|
|
Powered by
FUDForum. Page generated in 0.03819 seconds