[jbosstools-commits] JBoss Tools SVN: r17733 - in trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools: jst/web/tld and 1 other directory.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Sep 25 08:54:11 EDT 2009


Author: scabanovich
Date: 2009-09-25 08:54:11 -0400 (Fri, 25 Sep 2009)
New Revision: 17733

Removed:
   trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java
   trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/IFilePathEncoder.java
Modified:
   trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNatureExtension.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4913


Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNatureExtension.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNatureExtension.java	2009-09-25 12:40:18 UTC (rev 17732)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNatureExtension.java	2009-09-25 12:54:11 UTC (rev 17733)
@@ -6,9 +6,6 @@
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionPoint;
 import org.eclipse.core.runtime.Platform;
-import org.jboss.tools.common.model.plugin.ModelPlugin;
-import org.jboss.tools.common.model.util.ModelFeatureFactory;
-import org.jboss.tools.jst.web.tld.IFilePathEncoder;
 
 public class ModelNatureExtension {
 	public static String EXTENSION_POINT = "org.jboss.tools.common.model.modelnatures"; //$NON-NLS-1$
@@ -17,7 +14,6 @@
 	String displayName;
 	String pathEncoder;
 	String watcherContributor;
-	IFilePathEncoder pathEncoderInstance;
 
 	public ModelNatureExtension() {}
 
@@ -29,25 +25,8 @@
 		return displayName;
 	}
 
-	public IFilePathEncoder getPathEncoder () {
-		if(pathEncoderInstance != null) {
-			return pathEncoderInstance;
-		}
-		if(pathEncoder == null) {
-			return null;
-		}
-		if(pathEncoder.length() == 0) {
-			pathEncoder = null;
-			return null;
-		}
-		try {
-			pathEncoderInstance = (IFilePathEncoder)ModelFeatureFactory.getInstance().createFeatureInstance(pathEncoder);
-		} catch (ClassCastException e) {
-			ModelPlugin.getPluginLog().logError(e);
-		} finally {
-			pathEncoder = null;
-		}
-		return pathEncoderInstance;
+	public String getPathEncoder () {
+		return pathEncoder;
 	}
 
 	public String getWatcherContributor() {

Deleted: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java	2009-09-25 12:40:18 UTC (rev 17732)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java	2009-09-25 12:54:11 UTC (rev 17733)
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/ 
-package org.jboss.tools.jst.web.tld;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.jboss.tools.common.model.project.ModelNatureExtension;
-
-public class FilePathEncoderFactory {
-
-	public static IFilePathEncoder getEncoder(IProject project) {
-		if(project == null || !project.isOpen()) return null;
-		ModelNatureExtension[] es = ModelNatureExtension.getInstances();
-		for (int i = 0; i < es.length; i++) {
-			try {
-				if(project.hasNature(es[i].getName())) {
-					IFilePathEncoder encoder = es[i].getPathEncoder();
-					if(encoder != null) return encoder;
-				}
-			} catch (CoreException e) {
-				//ignore - all checks are done above
-			}
-		}
-		return null;
-	}
-
-}

Deleted: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/IFilePathEncoder.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/IFilePathEncoder.java	2009-09-25 12:40:18 UTC (rev 17732)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/IFilePathEncoder.java	2009-09-25 12:54:11 UTC (rev 17733)
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/ 
-package org.jboss.tools.jst.web.tld;
-
-import java.util.Properties;
-
-import org.jboss.tools.common.model.XModelObject;
-
-public interface IFilePathEncoder {
-	public static String PATH_TYPE = "pathType"; //$NON-NLS-1$
-	public static String PATH_ADDITION = "pathAddition"; //$NON-NLS-1$
-	
-	public static String ABSOLUTE_PATH = "absolute"; //$NON-NLS-1$
-	public static String RELATIVE_PATH = "relative"; //$NON-NLS-1$
-	
-	/**
-	 * Returns path that should be inserted to jsp page.
-	 * 
-	 * @path file path relative to WebContent
-	 */
-	public String encode(String path, XModelObject f, String tag, VpeTaglibManager taglibs, Properties context);
-	
-	/**
-	 * Returns file path relative to WebContent
-	 * 
-	 * @path value on jsp page
-	 */
-	public String decode(String path, XModelObject f, String tag, VpeTaglibManager taglibs, Properties context);
-}



More information about the jbosstools-commits mailing list