Author: scabanovich
Date: 2009-04-09 08:22:34 -0400 (Thu, 09 Apr 2009)
New Revision: 14630
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/handlers/ImportTLDToPaletteSupport.java
Log:
JBIDE-4153
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF 2009-04-09 12:12:22 UTC
(rev 14629)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF 2009-04-09 12:22:34 UTC
(rev 14630)
@@ -1,9 +1,11 @@
Manifest-Version: 1.0
+Eclipse-LazyStart: true
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-ClassPath: web.jar
Bundle-Activator: org.jboss.tools.jst.web.WebModelPlugin
Bundle-Vendor: %providerName
+Plugin-Class: org.jboss.tools.jst.web.WebModelPlugin
Bundle-SymbolicName: org.jboss.tools.jst.web;singleton:=true
Bundle-Localization: plugin
Require-Bundle: org.jboss.tools.common.model;visibility:=reexport,
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/handlers/ImportTLDToPaletteSupport.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/handlers/ImportTLDToPaletteSupport.java 2009-04-09
12:12:22 UTC (rev 14629)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/handlers/ImportTLDToPaletteSupport.java 2009-04-09
12:22:34 UTC (rev 14630)
@@ -14,6 +14,9 @@
import java.util.Properties;
import java.util.TreeMap;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.osgi.util.NLS;
import org.jboss.tools.common.meta.action.impl.DefaultWizardDataValidator;
@@ -139,7 +142,13 @@
class ImportTLDValidator extends DefaultWizardDataValidator {
public void validate(Properties data) {
message = null;
- XModelObject s = getSelectedResource(data.getProperty("tld"));
//$NON-NLS-1$
+ String tld = data.getProperty("tld");
+ IStatus status = ResourcesPlugin.getWorkspace().validatePath(tld, IResource.FILE);
+ if(status != null && !status.isOK()) {
+ message = status.getMessage();
+ return;
+ }
+ XModelObject s = getSelectedResource(tld); //$NON-NLS-1$
super.validate(data);
if(message != null) return;
String name = data.getProperty("name"); //$NON-NLS-1$