if (obj instanceof IScriptFolder) {
Logger.debugMSG("Selection is scriptfolder");
IScriptFolder folder = (IScriptFolder) obj;
try {
String fullPath = folder.getUnderlyingResource().getFullPath().toString();
Logger.debugMSG("Setting container text to " + fullPath);
containerText.setText(fullPath);
} catch (ModelException e) {
Logger.logException(e);
}
} else if (obj instanceof ProjectFragment) {
IProjectFragment fragment = (IProjectFragment) obj;
Logger.debugMSG("Selection is projectfragment");
try {
String fullPath = fragment.getUnderlyingResource().getFullPath().toString();
Logger.debugMSG("Setting container text to " + fullPath);
containerText.setText(fullPath);
} catch (ModelException e) {
Logger.logException(e);
}
} else if (obj instanceof IScriptProject) {
IScriptProject proj = (IScriptProject) obj;
Logger.debugMSG("Selection is scriptproject");
containerText.setText(proj.getPath().toString());
} else if (obj instanceof IFolder) {
IFolder folder = (IFolder) obj;
Logger.debugMSG("Selection is folder");
containerText.setText(folder.getFullPath().toString());
} else {
Logger.debugMSG("Could not determine selection type");
if (obj != null) {
Logger.debugMSG("type was " + obj.getClass());
} else {