JBoss Tools SVN: r5867 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-01-22 09:25:15 -0500 (Tue, 22 Jan 2008)
New Revision: 5867
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenQueryEditorAction.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1665
select ConsoleConfiguration in combobox
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenQueryEditorAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenQueryEditorAction.java 2008-01-22 12:58:28 UTC (rev 5866)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenQueryEditorAction.java 2008-01-22 14:25:15 UTC (rev 5867)
@@ -1,8 +1,14 @@
package org.hibernate.eclipse.console.actions;
+import java.io.FileNotFoundException;
import java.util.Iterator;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.PartInitException;
import org.eclipse.ui.actions.SelectionListenerAction;
import org.hibernate.HibernateException;
import org.hibernate.console.ConsoleConfiguration;
@@ -20,17 +26,19 @@
protected void doRun() {
boolean showed = false;
- for (Iterator i = getSelectedNonResources().iterator(); i.hasNext();) {
- try {
- Object node = i.next();
- if(node instanceof ConsoleConfiguration) {
- final ConsoleConfiguration config = (ConsoleConfiguration) node;
- openQueryEditor( config, "" );
- showed = true;
- }
- } catch(HibernateException he) {
- HibernateConsolePlugin.getDefault().showError(null, "Exception while trying to open HQL editor", he);
- }
+ IStructuredSelection sel = getStructuredSelection();
+ if (sel instanceof TreeSelection){
+ TreePath[] paths = ((TreeSelection)sel).getPaths();
+ for (int i = 0; i < paths.length; i++) {
+ TreePath path = paths[i];
+ ConsoleConfiguration config = (ConsoleConfiguration) path.getSegment(0);
+ try {
+ openQueryEditor( config, "" );
+ } catch(HibernateException he) {
+ HibernateConsolePlugin.getDefault().showError(null, "Exception while trying to open HQL editor", he);
+ }
+ showed = true;
+ }
}
if(!showed) {
18 years, 2 months
JBoss Tools SVN: r5866 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/help.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-01-22 07:58:28 -0500 (Tue, 22 Jan 2008)
New Revision: 5866
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/help/keys-hibernate3.properties
Log:
JBIDE-1474
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/help/keys-hibernate3.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/help/keys-hibernate3.properties 2008-01-22 12:56:01 UTC (rev 5865)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/help/keys-hibernate3.properties 2008-01-22 12:58:28 UTC (rev 5866)
@@ -1,3 +1,14 @@
+FileSystemFolder_CreateFileHibernate3_0.WindowTitle=New File Hibernate 3.0
+FileSystemFolder_CreateFileHibernate3_0.Title=File Hibernate 3.0
+FileFolder_CreateFileHibernate3_0.WindowTitle=New File Hibernate 3.0
+FileFolder_CreateFileHibernate3_0.Title=File Hibernate 3.0
+
+FileSystemFolder_CreateFileHibConfig3_0.WindowTitle=New File Hibernate Config 3.0
+FileSystemFolder_CreateFileHibConfig3_0.Title=File Hibernate Config 3.0
+FileFolder_CreateFileHibConfig3_0.WindowTitle=New File Hibernate Config 3.0
+FileFolder_CreateFileHibConfig3_0.Title=File Hibernate Config 3.0
+
+
### File Hibernate
FileHibernate3=/model/noHelpYet.html
18 years, 2 months
JBoss Tools SVN: r5865 - trunk/common/plugins/org.jboss.tools.common.model/resources/help.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-01-22 07:56:01 -0500 (Tue, 22 Jan 2008)
New Revision: 5865
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties
Log:
JBIDE-1474
Modified: trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties 2008-01-22 12:55:23 UTC (rev 5864)
+++ trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties 2008-01-22 12:56:01 UTC (rev 5865)
@@ -216,6 +216,11 @@
FileSystemFolder_CreateFileProperties.WindowTitle=New File Properties
FileSystemFolder_CreateFileProperties.Title=File Properties
+FileSystemFolder_CreateFile_0.WindowTitle=New File
+FileSystemFolder_CreateFile_0.Title=File
+FileFolder_CreateFile_0.WindowTitle=New File
+FileFolder_CreateFile_0.Title=File
+
##### File ANT #####
FileANT=/model/FileANT.html
@@ -225,12 +230,11 @@
##### Create File ANT #####
-FileFolder_CreateFileANT=/model/CreateFile.html
-FileFolder_CreateFileANT.WindowTitle=New File ANT
+FileSystemFolder_CreateFileANT_0.WindowTitle=New File ANT
+FileSystemFolder_CreateFileANT_0.Title=File ANT
+FileFolder_CreateFileANT_0.WindowTitle=New File ANT
+FileFolder_CreateFileANT_0.Title=File ANT
-FileSystemFolder_CreateFileANT=/model/CreateFile.html
-FileSystemFolder_CreateFileANT.WindowTitle=File ANT
-
##### File *.class #####
FileCLASS=/model/FileCLASS.html
18 years, 2 months
JBoss Tools SVN: r5864 - trunk/jst/plugins/org.jboss.tools.jst.web/resources/help.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-01-22 07:55:23 -0500 (Tue, 22 Jan 2008)
New Revision: 5864
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties
Log:
JBIDE-1474
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties 2008-01-22 12:30:50 UTC (rev 5863)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties 2008-01-22 12:55:23 UTC (rev 5864)
@@ -19,6 +19,11 @@
FileSystemFolder_CreateFileJS.WindowTitle=New JS File
FileSystemFolder_CreateFileJS.Title=JS File
+FileSystemFolder_CreateFileXML_0.WindowTitle=New XML File
+FileSystemFolder_CreateFileXML_0.Title=XML File
+FileFolder_CreateFileXML_0.WindowTitle=New XML File
+FileFolder_CreateFileXML_0.Title=XML File
+
FileXML=/struts/FileXML.html
FileXML_Properties=/struts/FileXML_Properties.html
18 years, 2 months
JBoss Tools SVN: r5863 - trunk/common/plugins/org.jboss.tools.common.model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-01-22 07:30:50 -0500 (Tue, 22 Jan 2008)
New Revision: 5863
Modified:
trunk/common/plugins/org.jboss.tools.common.model/plugin.xml
Log:
JBIDE-1474
Modified: trunk/common/plugins/org.jboss.tools.common.model/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/plugin.xml 2008-01-22 12:30:21 UTC (rev 5862)
+++ trunk/common/plugins/org.jboss.tools.common.model/plugin.xml 2008-01-22 12:30:50 UTC (rev 5863)
@@ -368,6 +368,8 @@
class="org.jboss.tools.common.ant.model.handlers.CreateAntFileSupport"/>
<xclass id="org.jboss.tools.common.model.files.handlers.CreateFileSupport"
class="org.jboss.tools.common.model.files.handlers.CreateFileSupport"/>
+ <xclass id="org.jboss.tools.common.model.files.handlers.CreateFolderSupport"
+ class="org.jboss.tools.common.model.files.handlers.CreateFolderSupport"/>
<xclass id="org.jboss.tools.common.meta.action.impl.SignificanceMessageImpl"
class="org.jboss.tools.common.meta.action.impl.SignificanceMessageImpl"/>
18 years, 2 months
JBoss Tools SVN: r5862 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-01-22 07:30:21 -0500 (Tue, 22 Jan 2008)
New Revision: 5862
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java
Log:
JBIDE-1474
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java 2008-01-22 12:29:28 UTC (rev 5861)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java 2008-01-22 12:30:21 UTC (rev 5862)
@@ -334,6 +334,7 @@
oldAttribute = oldAttributes.get(oldAttribute);
if(oldAttribute != null && element.hasAttribute(oldAttribute)) {
xmlname = oldAttribute;
+ break;
}
}
}
18 years, 2 months
JBoss Tools SVN: r5861 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-01-22 07:29:28 -0500 (Tue, 22 Jan 2008)
New Revision: 5861
Added:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFolderSupport.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/TargetHolder.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFileSupport.java
Log:
JBIDE-1474
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFileSupport.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFileSupport.java 2008-01-22 12:29:00 UTC (rev 5860)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFileSupport.java 2008-01-22 12:29:28 UTC (rev 5861)
@@ -34,6 +34,7 @@
boolean useVersions = false;
public void reset() {
+ targetHolder.setAction(action);
if(hasTemplate()) {
String[] s = getPageTemplateList();
setValueList(0, "template", s);
@@ -279,53 +280,6 @@
return targetHolder.target;
}
- class TargetHolder {
- XModelObject target;
- String path;
- IResource folder;
- String addPath = "";
-
- public void revalidate(String newPath) {
- if(newPath == path || (newPath != null && newPath.equals(path))) return;
- path = newPath;
- addPath = "";
- folder = (path == null) ? null : ModelPlugin.getWorkspace().getRoot().findMember(path);
- target = EclipseResourceUtil.getObjectByResource(folder);
- if(path != null && (folder == null || !folder.exists())) {
- String p = path.replace('\\', '/');
- String ap = "";
- while(true) {
- int q = p.lastIndexOf('/');
- if(q < 0) break;
- ap = p.substring(q) + ap;
- p = p.substring(0, q);
- folder = ModelPlugin.getWorkspace().getRoot().findMember(p);
- if(folder != null && folder.exists()) {
- addPath = ap;
- if(addPath.endsWith("/")) addPath = addPath.substring(0, addPath.length() - 1);
- target = EclipseResourceUtil.createObjectForResource(folder);
- break;
- }
- }
- } else if(target == null && folder != null && folder.exists()) {
- target = EclipseResourceUtil.createObjectForResource(folder);
- } else if(target != null && "FileSystems".equals(target.getModelEntity().getName())) {
- target = EclipseResourceUtil.findFileSystem(folder, target.getModel());
- if(target == null) target = EclipseResourceUtil.createObjectForResource(folder);
- }
- }
- public void saveLastPath() {
- if(path == null || folder == null) return;
- QualifiedName n = new QualifiedName("", action.getName() + "_lastPath");
- try {
- folder.getProject().setPersistentProperty(n, path);
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError("CreateFileSuppport:TargetHolder:saveLastPath:" + e.getMessage());
- }
- }
-
- }
-
protected DefaultWizardDataValidator validator = createValidator();
public WizardDataValidator getValidator(int step) {
Added: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFolderSupport.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFolderSupport.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFolderSupport.java 2008-01-22 12:29:28 UTC (rev 5861)
@@ -0,0 +1,197 @@
+package org.jboss.tools.common.model.files.handlers;
+
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.resources.IResource;
+import org.jboss.tools.common.meta.action.XEntityData;
+import org.jboss.tools.common.meta.action.impl.DefaultWizardDataValidator;
+import org.jboss.tools.common.meta.action.impl.SpecialWizardSupport;
+import org.jboss.tools.common.meta.action.impl.WizardDataValidator;
+import org.jboss.tools.common.meta.action.impl.handlers.DefaultCreateHandler;
+import org.jboss.tools.common.model.ServiceDialog;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.filesystems.impl.CreateFileHandler;
+import org.jboss.tools.common.model.filesystems.impl.FolderImpl;
+
+public class CreateFolderSupport extends SpecialWizardSupport {
+ protected TargetHolder targetHolder = new TargetHolder();
+
+ public CreateFolderSupport() {}
+
+ public void reset() {
+ targetHolder.setAction(action);
+ targetHolder.target = getTarget();
+ IResource r = (IResource)getTarget().getAdapter(IResource.class);
+ if(r == null) {
+ setAttributeValue(0, "folder", "");
+ targetHolder.revalidate(null);
+ } else {
+ targetHolder.revalidate(r.getFullPath().toString());
+ setAttributeValue(0, "folder", "" + targetHolder.path);
+ }
+ }
+
+ @Override
+ public void action(String name) throws Exception {
+ if(FINISH.equals(name)) {
+ if(!checkResource()) return;
+ execute();
+ setFinished(true);
+ } else if(CANCEL.equals(name)) {
+ setFinished(true);
+ } else if(HELP.equals(name)) {
+ help();
+ }
+ }
+
+ public String[] getActionNames(int stepId) {
+ return new String[]{FINISH, CANCEL, HELP};
+ }
+
+ protected boolean checkResource() {
+ if(targetHolder.addPath.length() == 0) return true;
+ ServiceDialog d = getTarget().getModel().getService();
+ String message = "Folder " + targetHolder.path + " does not exist. Do you want to create it?";
+ int q = d.showDialog("Warning", message, new String[]{SpecialWizardSupport.OK, SpecialWizardSupport.CANCEL}, null, ServiceDialog.QUESTION);
+ return q == 0;
+ }
+
+ public boolean canCreateResource(String path) {
+ if(targetHolder.target == null) return false;
+ if(path == null || path.length() == 0 || path.indexOf('*') >= 0) return false;
+ return isCorrectPath(path) && !resourceExists(path);
+ }
+
+ boolean isCorrectPath(String path) {
+ path = revalidatePath(path);
+ if(path == null || path.equals("/") || path.indexOf("//") >= 0) return false;
+ return true;
+ }
+
+ boolean resourceExists(String path) {
+ if(path == null || targetHolder.target == null) return false;
+ path = revalidatePath(path);
+ if(path.startsWith("/")) path = path.substring(1);
+ return targetHolder.target.getChildByPath(path) != null;
+ }
+
+ protected String revalidatePath(String path) {
+ if(path == null || path.length() == 0) return path;
+ if(!path.startsWith("/")) path = "/" + path;
+ if(targetHolder.addPath.length() > 0) {
+ path = targetHolder.addPath + path;
+ }
+ return path;
+ }
+
+ protected void execute() throws Exception {
+ Properties p = extractStepData(0);
+ String path = p.getProperty("name");
+ path = revalidatePath(path);
+ XModelObject f = createFolder(path);
+ if(f != null) targetHolder.saveLastPath();
+ }
+
+ protected XModelObject createFolder(String path) throws Exception {
+ if(!canCreateResource(path)) return null;
+ XModelObject fs = targetHolder.target;
+
+ StringTokenizer st = new StringTokenizer(path, "/");
+ int c = st.countTokens(), i = 0;
+ while(i < c) {
+ String s = st.nextToken();
+ XModelObject o = fs.getChildByPath(s);
+ if(o == null) {
+ o = fs.getModel().createModelObject("FileFolder", null);
+ o.setAttributeValue("name", s);
+ DefaultCreateHandler.addCreatedObject(fs, o, getProperties());
+ ((FolderImpl)o).save();
+ }
+ fs = o;
+ i++;
+ }
+
+ return fs;
+ }
+
+ protected final XModelObject getTargetFolder() {
+ return targetHolder.target;
+ }
+
+ protected DefaultWizardDataValidator validator = createValidator();
+
+ public WizardDataValidator getValidator(int step) {
+ validator.setSupport(this, step);
+ return validator;
+ }
+
+ protected DefaultWizardDataValidator createValidator() {
+ return new Validator();
+ }
+
+ protected class Validator extends DefaultWizardDataValidator {
+ public void validate(Properties data) {
+ String folder = data.getProperty("folder");
+ targetHolder.revalidate(folder);
+ message = null;
+ validateFolderName();
+ if(message != null) return;
+ validateChildName(data);
+ if(message != null) return;
+ super.validate(data);
+ }
+
+ String FORBIDDEN_INDICES = "\"\n\t*\\/:<>?|";
+ protected void validateChildName(Properties data) {
+ if(message != null) return;
+ String name = data.getProperty("name");
+ if(name == null || name.length() == 0) return;
+ if(name.equals(".")) {
+ message = "Incorrect name.";
+ } else if(name.endsWith(".") && name.indexOf('.') != name.lastIndexOf('.')) {
+ message = "Name must not end in a period.";
+ } else {
+ for (int i = 0; i < FORBIDDEN_INDICES.length(); i++) {
+ if(name.indexOf(FORBIDDEN_INDICES.charAt(i)) >= 0) {
+ message = "Name must not contain character " + FORBIDDEN_INDICES.charAt(i) + " .";
+ return;
+ }
+ }
+ }
+ }
+
+ String FORBIDDEN_FOLDER_LETTERS = "\"\n\t*:<>?|";
+ private void validateFolderName() {
+ if(targetHolder.addPath.length() == 0) return;
+ for (int i = 0; i < FORBIDDEN_FOLDER_LETTERS.length(); i++) {
+ if(targetHolder.addPath.indexOf(FORBIDDEN_FOLDER_LETTERS.charAt(i)) >= 0) {
+ message = "Folder name must not contain character " + FORBIDDEN_FOLDER_LETTERS.charAt(i) + " .";
+ return;
+ }
+ }
+ }
+
+ protected void validateAddFile(XEntityData[] ds, Properties data) {
+ CreateFileHandler.validateNameAndExtension(action, data, null);
+ if(targetHolder.target != null) {
+ String entity = action.getProperty("entity");
+ if(entity == null) entity = getEntityData()[step].getModelEntity().getName();
+ if(targetHolder.addPath == null || targetHolder.addPath.length() == 0) {
+ if(!checkChild(targetHolder.target, entity, data)) return;
+ }
+ } else {
+ message = "Cannot create file in specified folder.";
+ }
+ }
+
+ }
+
+ public String getFocusAttribute(int stepId) {
+ if(stepId == 0) {
+ return "name";
+ }
+ return super.getFocusAttribute(stepId);
+ }
+
+}
Added: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/TargetHolder.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/TargetHolder.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/TargetHolder.java 2008-01-22 12:29:28 UTC (rev 5861)
@@ -0,0 +1,61 @@
+package org.jboss.tools.common.model.files.handlers;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.QualifiedName;
+import org.jboss.tools.common.meta.action.XAction;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.plugin.ModelPlugin;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+
+public class TargetHolder {
+ protected XAction action;
+ XModelObject target;
+ String path;
+ IResource folder;
+ String addPath = "";
+
+ public void setAction(XAction action) {
+ this.action = action;
+ }
+
+ public void revalidate(String newPath) {
+ if(newPath == path || (newPath != null && newPath.equals(path))) return;
+ path = newPath;
+ addPath = "";
+ folder = (path == null) ? null : ModelPlugin.getWorkspace().getRoot().findMember(path);
+ target = EclipseResourceUtil.getObjectByResource(folder);
+ if(path != null && (folder == null || !folder.exists())) {
+ String p = path.replace('\\', '/');
+ String ap = "";
+ while(true) {
+ int q = p.lastIndexOf('/');
+ if(q < 0) break;
+ ap = p.substring(q) + ap;
+ p = p.substring(0, q);
+ folder = ModelPlugin.getWorkspace().getRoot().findMember(p);
+ if(folder != null && folder.exists()) {
+ addPath = ap;
+ if(addPath.endsWith("/")) addPath = addPath.substring(0, addPath.length() - 1);
+ target = EclipseResourceUtil.createObjectForResource(folder);
+ break;
+ }
+ }
+ } else if(target == null && folder != null && folder.exists()) {
+ target = EclipseResourceUtil.createObjectForResource(folder);
+ } else if(target != null && "FileSystems".equals(target.getModelEntity().getName())) {
+ target = EclipseResourceUtil.findFileSystem(folder, target.getModel());
+ if(target == null) target = EclipseResourceUtil.createObjectForResource(folder);
+ }
+ }
+
+ public void saveLastPath() {
+ if(path == null || folder == null) return;
+ QualifiedName n = new QualifiedName("", action.getName() + "_lastPath");
+ try {
+ folder.getProject().setPersistentProperty(n, path);
+ } catch (Exception e) {
+ ModelPlugin.getPluginLog().logError("CreateFileSuppport:TargetHolder:saveLastPath:" + e.getMessage());
+ }
+ }
+
+}
18 years, 2 months
JBoss Tools SVN: r5860 - trunk/common/plugins/org.jboss.tools.common.model/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-01-22 07:29:00 -0500 (Tue, 22 Jan 2008)
New Revision: 5860
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/filesystems.meta
Log:
JBIDE-1474
Modified: trunk/common/plugins/org.jboss.tools.common.model/resources/meta/filesystems.meta
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/resources/meta/filesystems.meta 2008-01-22 03:31:31 UTC (rev 5859)
+++ trunk/common/plugins/org.jboss.tools.common.model/resources/meta/filesystems.meta 2008-01-22 12:29:00 UTC (rev 5860)
@@ -263,10 +263,13 @@
<XActionItem kind="list">
<XActionItem ICON="action.empty" displayName="New" group="1"
kind="list" name="CreateActions">
- <XActionItem HandlerClassName="%CreateFolder%"
- ICON="action.new.file.folder" PROPERTIES="validator.add=true"
- WizardClassName="%Default%" displayName="Folder..." kind="action" name="CreateFolder">
- <EntityData EntityName="FileFolder">
+ <XActionItem HandlerClassName="%SpecialWizard%"
+ ICON="action.new.file.folder"
+ PROPERTIES="validator.add=true;support=org.jboss.tools.common.model.files.handlers.CreateFolderSupport"
+ displayName="Folder..." kind="action" name="CreateFolder">
+ <EntityData EntityName="NewFileWizard">
+ <AttributeData AttributeName="folder"/>
+ <AttributeData AttributeName="separator" Mandatory="no"/>
<AttributeData AttributeName="name"/>
</EntityData>
</XActionItem>
@@ -396,10 +399,13 @@
<XActionItem kind="list">
<XActionItem ICON="action.empty" displayName="New" group="1"
kind="list" name="CreateActions">
- <XActionItem HandlerClassName="%CreateFolder%"
- ICON="action.new.file.folder" PROPERTIES="validator.add=true"
- WizardClassName="%Default%" displayName="Folder..." kind="action" name="CreateFolder">
- <EntityData EntityName="FileFolder">
+ <XActionItem HandlerClassName="%SpecialWizard%"
+ ICON="action.new.file.folder"
+ PROPERTIES="validator.add=true;support=org.jboss.tools.common.model.files.handlers.CreateFolderSupport"
+ displayName="Folder..." kind="action" name="CreateFolder">
+ <EntityData EntityName="NewFileWizard">
+ <AttributeData AttributeName="folder"/>
+ <AttributeData AttributeName="separator" Mandatory="no"/>
<AttributeData AttributeName="name"/>
</EntityData>
</XActionItem>
18 years, 2 months
JBoss Tools SVN: r5859 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-01-21 22:31:31 -0500 (Mon, 21 Jan 2008)
New Revision: 5859
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
JBIDE-1487 I thought I fixed this long ago. JBossServersView is a singleton view. Should not be opened more than once.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2008-01-22 03:28:51 UTC (rev 5858)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2008-01-22 03:31:31 UTC (rev 5859)
@@ -121,6 +121,7 @@
<extension
point="org.eclipse.ui.views">
<view
+ allowMultiple="false"
category="org.eclipse.wst.server.ui"
class="org.jboss.ide.eclipse.as.ui.views.server.JBossServerView"
icon="icons/jboss.gif"
18 years, 2 months
JBoss Tools SVN: r5858 - trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-01-21 22:28:51 -0500 (Mon, 21 Jan 2008)
New Revision: 5858
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
Log:
JBIDE-1657 comment made there. Throwing CoreException instead
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2008-01-22 03:22:00 UTC (rev 5857)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2008-01-22 03:28:51 UTC (rev 5858)
@@ -28,7 +28,9 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.core.ClasspathContainerInitializer;
import org.eclipse.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IClasspathEntry;
@@ -39,6 +41,7 @@
import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponent;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.ServerCore;
+import org.jboss.ide.eclipse.as.classpath.core.ClasspathCorePlugin;
import org.jboss.ide.eclipse.as.classpath.core.runtime.WebtoolsProjectJBossClasspathContainerInitializer.WebtoolsProjectJBossClasspathContainer;
/**
@@ -107,9 +110,13 @@
private IPath path;
private IRuntime rt;
- public RuntimeClasspathContainer(IPath path) {
+ public RuntimeClasspathContainer(IPath path) throws CoreException {
this.path = path;
this.rt = ServerCore.findRuntime(path.segment(1));
+ if( rt == null )
+ throw new CoreException(
+ new Status( IStatus.ERROR, ClasspathCorePlugin.PLUGIN_ID,
+ "Runtime " + path.segment(1) + " does not exist. This classpath container cannot be initialized. "));
}
public IClasspathEntry[] getClasspathEntries() {
@@ -117,7 +124,7 @@
}
public String getDescription() {
- return "All JBoss Libraries [" + rt.getName() + "]";
+ return "All JBoss Libraries [" + (rt == null ? "null" : rt.getName()) + "]";
}
public int getKind() {
18 years, 2 months