Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » executed code and eclipse application test
executed code and eclipse application test [message #600082] Wed, 29 July 2009 13:35
gloria guitteaud is currently offline gloria guitteaudFriend
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
Previous Topic:executed code and eclipse application test
Next Topic:assertion exception from p2 while exporting
Goto Forum:
  


Current Time: Fri Apr 19 04:53:42 GMT 2024

Powered by FUDForum. Page generated in 0.01722 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top