JBoss Tools SVN: r7653 - trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-04-21 10:36:35 -0400 (Mon, 21 Apr 2008)
New Revision: 7653
Added:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUIPlugin.java
Log:
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUIPlugin.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUIPlugin.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUIPlugin.java 2008-04-21 14:36:35 UTC (rev 7653)
@@ -0,0 +1,50 @@
+package org.jboss.tools.ws.ui;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class JbossWSUIPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.ws.ui";
+
+ // The shared instance
+ private static JbossWSUIPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public JbossWSUIPlugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static JbossWSUIPlugin getDefault() {
+ return plugin;
+ }
+
+}
16 years, 6 months
JBoss Tools SVN: r7652 - in trunk/ws/plugins/org.jboss.tools.ws.ui: src/org/jboss/tools/ws/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-04-21 10:33:22 -0400 (Mon, 21 Apr 2008)
New Revision: 7652
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JBossWSUIPlugin.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java
Log:
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF 2008-04-21 10:50:56 UTC (rev 7651)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF 2008-04-21 14:33:22 UTC (rev 7652)
@@ -3,7 +3,7 @@
Bundle-Name: %PLUGIN_NAME
Bundle-SymbolicName: org.jboss.tools.ws.ui;singleton:=true
Bundle-Version: 1.0.0
-Bundle-Activator: org.jboss.tools.ws.ui.JBossWSUIPlugin
+Bundle-Activator: org.jboss.tools.ws.ui.JbossWSUIPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JBossWSUIPlugin.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JBossWSUIPlugin.java 2008-04-21 10:50:56 UTC (rev 7651)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JBossWSUIPlugin.java 2008-04-21 14:33:22 UTC (rev 7652)
@@ -6,18 +6,18 @@
/**
* The activator class controls the plug-in life cycle
*/
-public class JBossWSUIPlugin extends AbstractUIPlugin {
+public class JbossWSUIPlugin extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.jboss.tools.ws.ui";
// The shared instance
- private static JBossWSUIPlugin plugin;
+ private static JbossWSUIPlugin plugin;
/**
* The constructor
*/
- public JBossWSUIPlugin() {
+ public JbossWSUIPlugin() {
}
/*
@@ -43,7 +43,7 @@
*
* @return the shared instance
*/
- public static JBossWSUIPlugin getDefault() {
+ public static JbossWSUIPlugin getDefault() {
return plugin;
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java 2008-04-21 10:50:56 UTC (rev 7651)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java 2008-04-21 14:33:22 UTC (rev 7652)
@@ -34,7 +34,7 @@
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.jboss.tools.ws.core.*;
-import org.jboss.tools.ws.ui.JBossWSUIPlugin;
+import org.jboss.tools.ws.ui.JbossWSUIPlugin;
import org.jboss.tools.ws.ui.JbossWSUIMessages;
import org.jboss.tools.ws.ui.UIUtils;
@@ -58,7 +58,7 @@
IPreferenceStore ps = JbossWSCorePlugin.getDefault().getPreferenceStore();
this.setPreferenceStore(ps);
- UIUtils uiUtils = new UIUtils(JBossWSUIPlugin.PLUGIN_ID);
+ UIUtils uiUtils = new UIUtils(JbossWSUIPlugin.PLUGIN_ID);
final Composite mainComp = uiUtils.createComposite(superparent, 1);
TabFolder jbosswsPreferenceTab = new TabFolder(mainComp, SWT.WRAP);
16 years, 6 months
JBoss Tools SVN: r7651 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-04-21 06:50:56 -0400 (Mon, 21 Apr 2008)
New Revision: 7651
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2090 ConcurrentModificationException occurs during the Seam validation
The rev. 7623 results in a deadlock, rolled back
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java 2008-04-21 10:23:47 UTC (rev 7650)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java 2008-04-21 10:50:56 UTC (rev 7651)
@@ -328,15 +328,14 @@
}
public TypeInfoCollector getTypeCollector() {
+ // The rev. 7623 results in a deadlock, so, it's rolled back
// >>> Fix for JBIDE-2090
if(typeInfo != null) return typeInfo;
- synchronized (this) {
- if(typeInfo != null) return typeInfo;
- TypeInfoCollector tic = new TypeInfoCollector(this);
- tic.collectInfo();
- typeInfo = tic;
- }
+ TypeInfoCollector tic = new TypeInfoCollector(this);
+ tic.collectInfo();
+ typeInfo = tic;
+
// <<< Fix for JBIDE-2090
return typeInfo;
}
16 years, 6 months
JBoss Tools SVN: r7650 - trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-04-21 06:23:47 -0400 (Mon, 21 Apr 2008)
New Revision: 7650
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java
Log:
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java 2008-04-21 10:14:30 UTC (rev 7649)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java 2008-04-21 10:23:47 UTC (rev 7650)
@@ -12,14 +12,9 @@
package org.jboss.tools.ws.ui.preferences;
import java.io.File;
-import java.io.IOException;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.preference.PreferenceStore;
-import org.jboss.tools.ws.ui.UIUtils;
-import org.jboss.tools.ws.ui.JBossWSUIPlugin;
-import org.jboss.tools.ws.ui.JbossWSUIMessages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -38,6 +33,10 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.jboss.tools.ws.core.*;
+import org.jboss.tools.ws.ui.JBossWSUIPlugin;
+import org.jboss.tools.ws.ui.JbossWSUIMessages;
+import org.jboss.tools.ws.ui.UIUtils;
public class JbossWSRuntimePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
@@ -56,12 +55,7 @@
protected Control createContents(Composite superparent) {
- PreferenceStore ps = new PreferenceStore("jbosswsui.properties");
- try {
- ps.load();
- } catch (IOException e) {
- // Ignore
- }
+ IPreferenceStore ps = JbossWSCorePlugin.getDefault().getPreferenceStore();
this.setPreferenceStore(ps);
UIUtils uiUtils = new UIUtils(JBossWSUIPlugin.PLUGIN_ID);
16 years, 6 months
JBoss Tools SVN: r7649 - trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-04-21 06:14:30 -0400 (Mon, 21 Apr 2008)
New Revision: 7649
Added:
trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
Log:
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF 2008-04-21 10:14:30 UTC (rev 7649)
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %PLUGIN_NAME
+Bundle-SymbolicName: org.jboss.tools.ws.ui;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Activator: org.jboss.tools.ws.ui.JBossWSUIPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.jboss.tools.ws.core
+Eclipse-LazyStart: true
+Export-Package: org.jboss.tools.ws.ui,
+ org.jboss.tools.ws.ui.preferences
+Bundle-Vendor: %PLUGIN_PROVIDER
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
16 years, 6 months
JBoss Tools SVN: r7648 - in trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core: utils and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-04-21 06:11:50 -0400 (Mon, 21 Apr 2008)
New Revision: 7648
Added:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java
Log:
Added: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java 2008-04-21 10:11:50 UTC (rev 7648)
@@ -0,0 +1,195 @@
+package org.jboss.tools.ws.core.utils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.internal.common.J2EEUtils;
+import org.eclipse.osgi.util.NLS;
+
+public class JbossWSCoreUtils {
+
+ public static IPath pathToWebProjectContainer(String project) {
+ IPath projectRoot = getProjectRoot(project);
+ IPath currentDynamicWebProjectDir = J2EEUtils
+ .getWebContentPath(getProjectName(project));
+ IPath currentDynamicWebProjectDirWithoutProjectRoot = J2EEUtils
+ .getWebContentPath(getProjectName(project))
+ .removeFirstSegments(1).makeAbsolute();
+ if (projectRoot.toOSString().contains(getWorkspace().toOSString())) {
+ return getWorkspace().append(currentDynamicWebProjectDir);
+ } else {
+ return projectRoot
+ .append(currentDynamicWebProjectDirWithoutProjectRoot);
+ }
+
+ }
+
+ public static IPath getProjectRoot(String project) {
+ String projectString = replaceEscapecharactors(project.toString());
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(
+ getProjectNameFromFramewokNameString(projectString))
+ .getLocation();
+ }
+
+ // Fix for the windows build not working
+ private static String replaceEscapecharactors(String vulnarableString) {
+ if (vulnarableString.indexOf("/") != -1) {
+ vulnarableString = vulnarableString.replace('/', File.separator
+ .charAt(0));
+ }
+ return vulnarableString;
+ }
+
+ private static String getProjectNameFromFramewokNameString(
+ String frameworkProjectString) {
+ if (frameworkProjectString.indexOf(getSplitCharactor()) == -1) {
+ return frameworkProjectString;
+ } else {
+ return frameworkProjectString.split(getSplitCharactors())[1];
+ }
+ }
+
+ private static String getSplitCharactor() {
+ // Windows check (because from inside wtp in return I received a hard
+ // coded path)
+ if (File.separatorChar == '\\') {
+ return "\\";
+ } else {
+ return File.separator;
+ }
+ }
+
+ private static String getSplitCharactors() {
+ // Windows check (because from inside wtp in return I received a hard
+ // coded path)
+ if (File.separatorChar == '\\') {
+ return "\\" + File.separator;
+ } else {
+ return File.separator;
+ }
+ }
+
+ public static IPath getWorkspace() {
+ return ResourcesPlugin.getWorkspace().getRoot().getLocation();
+ }
+
+ public static IWorkspaceRoot getWorkspaceRoot() {
+ return ResourcesPlugin.getWorkspace().getRoot();
+ }
+
+ public static IProject getProjectName(String project) {
+ String projectString = replaceEscapecharactors(project.toString());
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(
+ getProjectNameFromFramewokNameString(projectString));
+ }
+
+ public static void copy(IPath sourcePath, IPath targetPath) {
+ System.out.println(sourcePath + " >> " + targetPath);
+
+ File sourceDir = sourcePath.toFile();
+ File[] children = sourceDir.listFiles();
+
+ FileInputStream finStream = null;
+ for (int i = 0; i < children.length; i++) {
+ if (children[i].isFile()) {
+ try {
+ finStream = new FileInputStream(children[i]);
+ } catch (FileNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ try {
+ makeFile(getWorkspaceRoot().getContainerForLocation(
+ targetPath), children[i].getName(), finStream);
+ } catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ } else {
+ try {
+ copy(sourcePath.append(children[i].getName()),makeFolder(getWorkspaceRoot().getContainerForLocation(
+ targetPath),children[i].getName()).getFullPath());
+ } catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ private static IFolder makeFolder(IContainer parent, String folderName)
+ throws CoreException {
+ IResource child = parent.findMember(folderName);
+ if (child == null) {
+ IFolder folder = parent.getFolder(new Path(folderName));
+ try {
+ folder.create(true, true, null);
+ } catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return folder;
+ } else {
+ if (child.getType() == IResource.FOLDER) {
+ return (IFolder) child;
+ } else {
+ throw new CoreException(new Status(IStatus.ERROR,
+ "ResourceUtils", 0, NLS.bind("ERROR",// EnvironmentMessages.MSG_ERROR_RESOURCE_NOT_FOLDER,
+ new Object[] { parent.getFullPath().append(
+ folderName).toString() }), null));
+ }
+ }
+
+ }
+
+ private static IFile makeFile(IContainer parent, String fileName,
+ InputStream inputStream) throws CoreException {
+ IResource child = parent.findMember(fileName);
+
+ if (child != null) {
+ if (child.getType() == IResource.FILE) {
+
+ // We have permission to overwrite so check if file is read-only
+ if (child.getResourceAttributes() != null
+ && child.getResourceAttributes().isReadOnly()) {
+ IFile[] files = new IFile[1];
+ files[0] = (IFile) child;
+ }
+
+ // Change the contents of the existing file.
+ IFile file = parent.getFile(new Path(fileName));
+ file.setContents(inputStream, true, true, null);
+
+ return file;
+
+ } else {
+ throw new CoreException(new Status(IStatus.ERROR,
+ "ResourceUtils", 0, NLS.bind("ERROR",
+ new Object[] { parent.getFullPath().append(
+ fileName) }), null));
+ }
+ } else {
+ // Create a new file.
+ IFile file = parent.getFile(new Path(fileName));
+ file.create(inputStream, true, null);
+
+ return file;
+ }
+ }
+
+}
16 years, 6 months
JBoss Tools SVN: r7647 - trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-04-21 06:06:46 -0400 (Mon, 21 Apr 2008)
New Revision: 7647
Removed:
trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
Log:
Deleted: trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF 2008-04-21 10:01:48 UTC (rev 7646)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF 2008-04-21 10:06:46 UTC (rev 7647)
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %PLUGIN_NAME
-Bundle-SymbolicName: org.jboss.tools.ws.ui;singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Activator: org.jboss.tools.ws.ui.JBossWSUIPlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.resources
-Eclipse-LazyStart: true
-Export-Package: org.jboss.tools.ws.ui,
- org.jboss.tools.ws.ui.preferences
-Bundle-Vendor: %PLUGIN_PROVIDER
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
16 years, 6 months
JBoss Tools SVN: r7646 - in trunk/ws/plugins/org.jboss.tools.ws.core: src/org/jboss/tools/ws/core and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-04-21 06:01:48 -0400 (Mon, 21 Apr 2008)
New Revision: 7646
Added:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore.properties
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCorePlugin.java
Removed:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/Activator.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessage.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java
Log:
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF 2008-04-21 07:39:48 UTC (rev 7645)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF 2008-04-21 10:01:48 UTC (rev 7646)
@@ -4,11 +4,14 @@
Bundle-SymbolicName: org.jboss.tools.ws.core;singleton:=true
Bundle-Version: 1.0.0
Bundle-Localization: plugin
-Bundle-Activator: org.jboss.tools.ws.core.Activator
+Bundle-Activator: org.jboss.tools.ws.core.JbossWSCorePlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.wst.common.project.facet.core,
org.eclipse.wst.common.frameworks,
- org.eclipse.core.resources
+ org.eclipse.core.resources,
+ org.eclipse.jst.ws
Eclipse-LazyStart: true
Bundle-Vendor: %PLUGIN_PROVIDER
+Export-Package: org.jboss.tools.ws.core,
+ org.jboss.tools.ws.core.command
Deleted: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/Activator.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/Activator.java 2008-04-21 07:39:48 UTC (rev 7645)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/Activator.java 2008-04-21 10:01:48 UTC (rev 7646)
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-
-package org.jboss.tools.ws.core;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.tools.ws.core";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
Deleted: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore 2008-04-21 07:39:48 UTC (rev 7645)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore 2008-04-21 10:01:48 UTC (rev 7646)
@@ -1 +0,0 @@
-PROGRESS_INSTALL_JBOSSWS_RUNTIME=JBoss Web Service Runtime
\ No newline at end of file
Copied: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore.properties (from rev 7606, trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore)
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore.properties (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore.properties 2008-04-21 10:01:48 UTC (rev 7646)
@@ -0,0 +1,4 @@
+PROGRESS_INSTALL_JBOSSWS_RUNTIME=JBoss Web Service Runtime
+DIR_LIB=lib
+DIR_WEB_INF=WEB-INF
+DIR_WEB_CONTENT=WebContent
\ No newline at end of file
Deleted: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessage.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessage.java 2008-04-21 07:39:48 UTC (rev 7645)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessage.java 2008-04-21 10:01:48 UTC (rev 7646)
@@ -1,19 +0,0 @@
-package org.jboss.tools.ws.core;
-
-import org.eclipse.osgi.util.NLS;
-
-public class JbossWSCoreMessage {
-
- private static final String BUNDLE_NAME = "org.jboss.tools.ws.ui.JbossWSCore"; //$NON-NLS-1$
-
- private JbossWSCoreMessage() {
- // Do not instantiate
- }
-
- public static String PROGRESS_INSTALL_JBOSSWS_RUNTIME;
-
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, JbossWSCoreMessage.class);
- }
-}
\ No newline at end of file
Copied: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java (from rev 7606, trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessage.java)
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java 2008-04-21 10:01:48 UTC (rev 7646)
@@ -0,0 +1,22 @@
+package org.jboss.tools.ws.core;
+
+import org.eclipse.osgi.util.NLS;
+
+public class JbossWSCoreMessages {
+
+ private static final String BUNDLE_NAME = "org.jboss.tools.ws.core.JbossWSCore"; //$NON-NLS-1$
+
+ private JbossWSCoreMessages() {
+ // Do not instantiate
+ }
+
+ public static String PROGRESS_INSTALL_JBOSSWS_RUNTIME;
+ public static String DIR_LIB;
+ public static String DIR_WEB_INF;
+ public static String DIR_WEB_CONTENT;
+
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, JbossWSCoreMessages.class);
+ }
+}
\ No newline at end of file
Added: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCorePlugin.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCorePlugin.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCorePlugin.java 2008-04-21 10:01:48 UTC (rev 7646)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+
+package org.jboss.tools.ws.core;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class JbossWSCorePlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.ws.core";
+
+ // The shared instance
+ private static JbossWSCorePlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public JbossWSCorePlugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static JbossWSCorePlugin getDefault() {
+ return plugin;
+ }
+
+}
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java 2008-04-21 07:39:48 UTC (rev 7645)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java 2008-04-21 10:01:48 UTC (rev 7646)
@@ -7,7 +7,7 @@
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.ws.core.command;
@@ -25,116 +25,64 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceStore;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.jboss.tools.ws.core.JbossWSCoreMessages;
+import org.jboss.tools.ws.core.JbossWSCorePlugin;
+import org.jboss.tools.ws.core.utils.JbossWSCoreUtils;
+public class JbossWSRuntimeCommand extends AbstractDataModelOperation {
-public class JbossWSRuntimeCommand extends
-AbstractDataModelOperation {
-
IProject project;
- String runtimelocation;
-
- public JbossWSRuntimeCommand(IProject project){
- PreferenceStore ps = new PreferenceStore("jbosswsui.properties");
- try {
- ps.load();
- } catch (IOException e) {
- // Ignore
- }
- runtimelocation = ps.getString("jbosswsruntimelocation");
+ String runtimeLocation;
+
+ public JbossWSRuntimeCommand(IProject project) {
this.project = project;
}
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
+ throws ExecutionException {
return Status.OK_STATUS;
}
-
- public IStatus executeOverride(IProgressMonitor monitor) {
- // Copy the axis2 facet in to this project
- IStatus status =null;
-// String runtimeLocation = null;
-// ContentCopyUtils contentCopyUtils = new ContentCopyUtils();
-// try {
-// if(context.isAxis2ServerPathRepresentsWar()
-// || RuntimePropertyUtils.getWarStatusFromPropertiesFile()){
-// runtimeLocation = Axis2RuntimeUtils.copyAxis2War(
-// monitor,
-// Axis2Constants.PROPERTY_KEY_PATH);
-// }else{
-//
-// runtimeLocation = Axis2WebappUtils.copyAxis2War(
-// monitor,
-// Axis2Constants.PROPERTY_KEY_PATH);
-// }
-// } catch (FileNotFoundException e) {
-// return handleExceptionStatus(e);
-// } catch (IOException e) {
-// return handleExceptionStatus(e);
-// } catch (Exception e) {
-// return handleExceptionStatus(e);
-// }
-//
-// // First Setting the libs folder as ignored and then copy the content of
-// // the runtime
-// IPath libPath = new Path(runtimeLocation);
-// libPath = libPath.append(Axis2Constants.DIR_WEB_INF);
-// libPath = libPath.append(Axis2Constants.DIR_LIB);
-// List<String> ignoreList = new ArrayList<String>();
-// ignoreList.add(libPath.toOSString());
-// contentCopyUtils.updateCheckList(ignoreList);
-//
-// status = contentCopyUtils.copyDirectoryRecursivelyIntoWorkspace(
-// runtimeLocation,
-// FacetContainerUtils.pathToWebProjectContainer(project.toString()),
-// monitor,
-// false
-// );
-//
-// // After that copy the nesessery set of libraries to the project again
-// List<String> includeList = new ArrayList<String>();
-// contentCopyUtils.updateCheckList(loadIncludeListWithAxis2Libs(libPath.toOSString(),
-// includeList));
-// String[] nodes = {Axis2Constants.DIR_WEB_INF,Axis2Constants.DIR_LIB};
-// status = contentCopyUtils.copyDirectoryRecursivelyIntoWorkspace(
-// libPath.toOSString(),
-// FileUtils.addNodesToPath(
-// FacetContainerUtils.pathToWebProjectContainer(project.toString()),
-// nodes),
-// monitor,
-// true
-// );
-//
-// // Merge web.xml Files
-// MergeWEBXMLCommand mergeWebXMLCommand = new MergeWEBXMLCommand();
-// mergeWebXMLCommand.setExtraAxis2TagsAdded(false);
-// mergeWebXMLCommand.setServerProject(project);
-// mergeWebXMLCommand.exexuteOverride(monitor);
-//
-// // clean up tempery files
-// File tempFacetDirectory = new File(runtimeLocation);
-// if (tempFacetDirectory.exists() && context.isAxis2ServerPathRepresentsWar()) {
-// FileUtils.deleteDir(tempFacetDirectory);
-// }
-// status = Status.OK_STATUS;
+
+ public IStatus executeOverride(IProgressMonitor monitor) {
+ IStatus status = null;
+
+ IPreferenceStore ps = JbossWSCorePlugin.getDefault()
+ .getPreferenceStore();
+ runtimeLocation = ps.getString("jbosswsruntimelocation");
+
+ // copy lib to project's folder
+ IPath libPath = new Path(runtimeLocation);
+ libPath = libPath.append(JbossWSCoreMessages.DIR_LIB);
+
+ IPath targetPath = JbossWSCoreUtils.pathToWebProjectContainer(project
+ .toString());
+ targetPath = targetPath
+ .append(JbossWSCoreMessages.DIR_WEB_INF).append(
+ JbossWSCoreMessages.DIR_LIB);
+ JbossWSCoreUtils.copy(libPath, targetPath);
+
+ status = Status.OK_STATUS;
return status;
}
-
- private void cleanupIfFacetStatusFailed(String runtimeLocation){
-// File tempFacetDirectory = new File(runtimeLocation);
-// if (tempFacetDirectory.exists()) {
-// FileUtils.deleteDir(tempFacetDirectory);
-// }
+
+ private void cleanupIfFacetStatusFailed(String runtimeLocation) {
+ // File tempFacetDirectory = new File(runtimeLocation);
+ // if (tempFacetDirectory.exists()) {
+ // FileUtils.deleteDir(tempFacetDirectory);
+ // }
}
-
- private IStatus handleExceptionStatus(Exception e){
+
+ private IStatus handleExceptionStatus(Exception e) {
IStatus status = null;
-// status = new Status(1,project.toString(),1,Axis2CoreUIMessages.ERROR_SERVER_IS_NOT_SET,e);
-// cleanupIfFacetStatusFailed(Axis2CoreUtils.tempAxis2Directory());
+ // status = new
+ // Status(1,project.toString(),1,Axis2CoreUIMessages.ERROR_SERVER_IS_NOT_SET,e);
+ // cleanupIfFacetStatusFailed(Axis2CoreUtils.tempAxis2Directory());
return status;
}
-
+
/**
* Load the exact libraries list from the axis2 jars with the correct
* versions to the <code>path</code>. Doing it this way introduce the
@@ -145,22 +93,23 @@
* @param includeList
* @return loaded list
*/
- private List loadIncludeListWithAxis2Libs(String path, List includeList){
-// for (int i = 0; i < Axis2Constants.AXIS2_LIB_PREFIXES.length; i++) {
-// File[] jarFileList = FileUtils.getMatchingFiles(path,
-// Axis2Constants.AXIS2_LIB_PREFIXES[i],
-// Axis2Constants.JAR);
-// for (int j = 0; j < jarFileList.length; j++) {
-// includeList.add(jarFileList[j].getAbsolutePath());
-// }
-// // Fix for the 205972
-// File[] licenseFileList = FileUtils.getMatchingFiles(path,
-// Axis2Constants.AXIS2_LIB_PREFIXES[i],
-// Axis2Constants.TXT);
-// for (int k = 0; k < licenseFileList.length; k++) {
-// includeList.add(licenseFileList[k].getAbsolutePath());
-// }
-// }
+ private List loadIncludeListWithAxis2Libs(String path, List includeList) {
+ // for (int i = 0; i < Axis2Constants.AXIS2_LIB_PREFIXES.length; i++) {
+ // File[] jarFileList = FileUtils.getMatchingFiles(path,
+ // Axis2Constants.AXIS2_LIB_PREFIXES[i],
+ // Axis2Constants.JAR);
+ // for (int j = 0; j < jarFileList.length; j++) {
+ // includeList.add(jarFileList[j].getAbsolutePath());
+ // }
+ // // Fix for the 205972
+ // File[] licenseFileList = FileUtils.getMatchingFiles(path,
+ // Axis2Constants.AXIS2_LIB_PREFIXES[i],
+ // Axis2Constants.TXT);
+ // for (int k = 0; k < licenseFileList.length; k++) {
+ // includeList.add(licenseFileList[k].getAbsolutePath());
+ // }
+ // }
return includeList;
}
+
}
\ No newline at end of file
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java 2008-04-21 07:39:48 UTC (rev 7645)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java 2008-04-21 10:01:48 UTC (rev 7646)
@@ -19,7 +19,7 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.wst.common.project.facet.core.IDelegate;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.jboss.tools.ws.core.JbossWSCoreMessage;
+import org.jboss.tools.ws.core.JbossWSCoreMessages;
import org.jboss.tools.ws.core.command.JbossWSRuntimeCommand;
public class JbossWSInstallRuntimeDelegate implements IDelegate {
@@ -28,7 +28,7 @@
public void execute(IProject project, IProjectFacetVersion arg1, Object arg2,
IProgressMonitor monitor) throws CoreException {
- monitor.beginTask(JbossWSCoreMessage.PROGRESS_INSTALL_JBOSSWS_RUNTIME, 2 );
+ monitor.beginTask(JbossWSCoreMessages.PROGRESS_INSTALL_JBOSSWS_RUNTIME, 2 );
JbossWSRuntimeCommand command = new JbossWSRuntimeCommand(project);
status = command.executeOverride(monitor);
16 years, 6 months
JBoss Tools SVN: r7645 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-04-21 03:39:48 -0400 (Mon, 21 Apr 2008)
New Revision: 7645
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2058,
1. Full path to image "src" attribute was added
2. Some css styles and classes were fixed
3. Functionality of getting label value from bundle for panelGroup and PanelItem was added
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-04-21 07:39:43 UTC (rev 7644)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-04-21 07:39:48 UTC (rev 7645)
@@ -15,11 +15,20 @@
import java.net.URL;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.editors.text.ILocationProvider;
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.project.IModelNature;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.jst.web.project.WebProject;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.css.ResourceReference;
+import org.jboss.tools.vpe.editor.template.expression.VpeFunctionSrc;
+import org.jboss.tools.vpe.editor.template.expression.VpeValue;
import org.w3c.dom.Element;
public class VpeStyleUtil {
@@ -42,15 +51,15 @@
public static final String SPACE_STRING = " "; //$NON-NLS-1$
public static final String EMPTY_STRING = ""; //$NON-NLS-1$
public static final String SINGLE_QUOTE_STRING = "\'"; //$NON-NLS-1$
-
+
public static String ATTR_URL = "url"; //$NON-NLS-1$
public static String OPEN_BRACKET = "("; //$NON-NLS-1$
public static String CLOSE_BRACKET = ")"; //$NON-NLS-1$
- public static String FILE_PRTOCOL = "file://"; //$NON-NLS-1$
- public static String FILE_STR = "file:"; //$NON-NLS-1$
- public static String FILE_SEPARATOR = "/"; //$NON-NLS-1$
-
- // sets parameter position in atribute style to absolute value
+ public static String FILE_PROTOCOL = "file:"; //$NON-NLS-1$
+ public static String HTTP_PROTOCOL = "http:"; //$NON-NLS-1$
+ public static String SLASH = "/"; //$NON-NLS-1$
+
+ // sets parameter position in attribute style to absolute value
public static void setAbsolute(Element sourceElement) {
String style = sourceElement.getAttribute(ATTRIBUTE_STYLE);
if (style == null) {
@@ -292,7 +301,7 @@
public static String addFullPathIntoBackgroundValue(String value,
IEditorInput input) {
- if (value.indexOf(FILE_STR) != -1) {
+ if (value.indexOf(FILE_PROTOCOL) != -1) {
return value;
}
@@ -300,7 +309,7 @@
value = getFilePath(input, value);
}
- value = FILE_PRTOCOL + value;
+ value = FILE_PROTOCOL + SLASH + SLASH + value;
URL url = null;
try {
url = new URL(value);
@@ -346,7 +355,7 @@
String filePath = urls[i].substring(startPathIndex + 1,
endPathIndex);
- if (filePath.indexOf(FILE_STR) != -1) {
+ if (filePath.indexOf(FILE_PROTOCOL) != -1) {
continue;
}
@@ -354,7 +363,7 @@
filePath = getFilePath(input, filePath);
}
- filePath = FILE_PRTOCOL + filePath;
+ filePath = FILE_PROTOCOL + SLASH + SLASH + filePath;
URL url = null;
try {
url = new URL(filePath);
@@ -467,14 +476,14 @@
String filePath = urls[i].substring(startPathIndex + 1,
endPathIndex);
- if (filePath.indexOf(FILE_STR) != -1) {
+ if (filePath.indexOf(FILE_PROTOCOL) != -1) {
continue;
}
if (!new File(filePath).isAbsolute()) {
filePath = getFilePath(href_val, filePath);
} else {
- filePath = FILE_PRTOCOL + filePath;
+ filePath = FILE_PROTOCOL + SLASH + SLASH + filePath;
}
URL url = null;
@@ -496,5 +505,121 @@
}
return finalStr;
}
+
+ /**
+ * Adds the full path to image "src" attribute.
+ *
+ * @param path image "src" attribute value
+ * @param pageContext the pageContext
+ *
+ * @return the full path to image "src" attribute
+ */
+ public static String addFullPathToImgSrc(String path,
+ VpePageContext pageContext) {
+ IPath tagPath = new Path(path);
+ if (tagPath.isEmpty()) {
+ return path;
+ }
+
+ String device = (tagPath.getDevice() == null ? tagPath.segment(0)
+ : tagPath.getDevice());
+ if (device != null
+ && (HTTP_PROTOCOL.equalsIgnoreCase(device) || FILE_PROTOCOL
+ .equalsIgnoreCase(device))) {
+ return path;
+ }
+
+ File locFile = tagPath.toFile();
+ if (locFile.exists()) {
+ return FILE_PROTOCOL + SLASH + SLASH + SLASH
+ + locFile.getAbsolutePath();
+ }
+
+ IEditorInput input = pageContext.getEditPart().getEditorInput();
+ IPath inputPath = getInputParentPath(input);
+ IPath imgPath = null;
+ if (input instanceof ILocationProvider) {
+ imgPath = inputPath.append(path);
+ } else {
+ IPath basePath = tagPath.isAbsolute() ? getRootPath(input)
+ : inputPath;
+ if (basePath != null) {
+ imgPath = basePath.append(tagPath);
+ }
+ }
+
+ if (imgPath != null && imgPath.toFile().exists()) {
+ return FILE_PROTOCOL + SLASH + SLASH + SLASH + imgPath.toString();
+ } else {
+ IFile file = null;
+ if (input instanceof IFileEditorInput) {
+ file = ((IFileEditorInput) input).getFile();
+ }
+
+ if (null != file) {
+ ResourceReference resourceReference = null;
+ String pathCopy = path;
+ if (SLASH.equals(path.substring(0, 1))) {
+ resourceReference = pageContext
+ .getRuntimeAbsoluteFolder(file);
+ pathCopy = pathCopy.substring(1);
+ } else {
+ resourceReference = pageContext
+ .getRuntimeRelativeFolder(file);
+ }
+
+ String location = null;
+ if (resourceReference != null) {
+ location = resourceReference.getLocation();
+ }
+
+ if (null == location && null != file.getLocation()) {
+ location = file.getLocation().toFile().getParent();
+ }
+
+ if (null != location) {
+ File f = new File(location + File.separator + pathCopy);
+ if (f.exists()) {
+ return FILE_PROTOCOL + SLASH + SLASH + SLASH
+ + f.getPath();
+ }
+ }
+ }
+ }
+ return path;
+ }
+
+ /**
+ * Gets the root path of the web project.
+ *
+ * @param input the input
+ *
+ * @return the root path
+ */
+ public static IPath getRootPath(IEditorInput input) {
+ IPath rootPath = null;
+ if (input instanceof IFileEditorInput) {
+ IProject project = ((IFileEditorInput) input).getFile()
+ .getProject();
+ if (project != null && project.isOpen()) {
+ IModelNature modelNature = EclipseResourceUtil
+ .getModelNature(project);
+ if (modelNature != null) {
+ XModel model = modelNature.getModel();
+ String rootPathStr = WebProject.getInstance(model)
+ .getWebRootLocation();
+ if (rootPathStr != null) {
+ rootPath = new Path(rootPathStr);
+ } else {
+ rootPath = project.getLocation();
+ }
+ } else {
+ rootPath = project.getLocation();
+ }
+ }
+ }
+ return rootPath;
+ }
+
}
\ No newline at end of file
16 years, 6 months
JBoss Tools SVN: r7644 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-04-21 03:39:43 -0400 (Mon, 21 Apr 2008)
New Revision: 7644
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2058,
1. Full path to image "src" attribute was added
2. Some css styles and classes were fixed
3. Functionality of getting label value from bundle for panelGroup and PanelItem was added
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2008-04-21 02:14:23 UTC (rev 7643)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2008-04-21 07:39:43 UTC (rev 7644)
@@ -24,6 +24,7 @@
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMText;
+import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -43,7 +44,7 @@
private static final String ICON_EXPANDED = "iconExpanded"; //$NON-NLS-1$
private static final String ICON_COLLAPSED = "iconCollapsed"; //$NON-NLS-1$
private static final String ICON_DISABLED = "iconDisabled"; //$NON-NLS-1$
- private static final String ICON_LABEL = "label"; //$NON-NLS-1$
+ private static final String LABEL = "label"; //$NON-NLS-1$
private static final String STYLE = "style"; //$NON-NLS-1$
private static final String STYLE_CLASS = "styleClass"; //$NON-NLS-1$
@@ -115,7 +116,6 @@
private static String pmg_iconExpanded;
private static String pmg_iconCollapsed;
private static String pmg_iconDisabled;
- private static String pmg_label;
private static String pmg_style;
private static String pmg_styleClass;
@@ -289,8 +289,42 @@
tableBodyRow.appendChild(column2);
column2.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, WIDTH_100_PERSENTS);
- nsIDOMText name = visualDocument.createTextNode(pmg_label);
- column2.appendChild(name);
+ /*
+ * Item label routine.
+ */
+ Attr labelAttr = null;
+ String labelValue = EMPTY;
+ String bundleValue = EMPTY;
+ String resultValue = EMPTY;
+ if (sourceElement.hasAttribute(LABEL)) {
+ labelAttr = sourceElement.getAttributeNode(LABEL);
+ }
+ if (null != labelAttr) {
+ labelValue = labelAttr.getNodeValue();
+ bundleValue = ComponentUtil.getBundleValue(pageContext,
+ labelAttr);
+ }
+
+ if (attrPresents(labelValue)) {
+ if (attrPresents(bundleValue)) {
+ if (!labelValue.equals(bundleValue)) {
+ resultValue = bundleValue;
+ } else {
+ resultValue = labelValue;
+ }
+ } else {
+ resultValue = labelValue;
+ }
+ } else {
+ if (attrPresents(bundleValue)) {
+ resultValue = bundleValue;
+ } else {
+ resultValue = EMPTY;
+ }
+ }
+ nsIDOMText text = visualDocument.createTextNode(resultValue);
+
+ column2.appendChild(text);
column2.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, activeChildId);
nsIDOMElement column3 = visualDocument
@@ -536,7 +570,6 @@
pmg_iconExpanded = sourceElement.getAttribute(ICON_EXPANDED);
pmg_iconCollapsed = sourceElement.getAttribute(ICON_COLLAPSED);
pmg_iconDisabled = sourceElement.getAttribute(ICON_DISABLED);
- pmg_label = sourceElement.getAttribute(ICON_LABEL);
pmg_style = sourceElement.getAttribute(STYLE);
pmg_styleClass = sourceElement.getAttribute(STYLE_CLASS);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2008-04-21 02:14:23 UTC (rev 7643)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2008-04-21 07:39:43 UTC (rev 7644)
@@ -19,9 +19,11 @@
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMText;
+import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -34,6 +36,8 @@
private static final String DISABLED = "disabled"; //$NON-NLS-1$
private static final String LABEL = "label"; //$NON-NLS-1$
private static final String ICON = "icon"; //$NON-NLS-1$
+ private static final String ICON_CLASS = "iconClass"; //$NON-NLS-1$
+ private static final String ICON_STYLE = "iconStyle"; //$NON-NLS-1$
private static final String ICON_DISABLED = "iconDisabled"; //$NON-NLS-1$
private static final String DISABLED_CLASS = "disabledClass"; //$NON-NLS-1$
private static final String DISABLED_STYLE = "disabledStyle"; //$NON-NLS-1$
@@ -67,14 +71,17 @@
private static final String TRUE = "true"; //$NON-NLS-1$
private static final String RIGHT = "right"; //$NON-NLS-1$
private static final String LEFT = "left"; //$NON-NLS-1$
+ private static final String VSPACE = "vspace"; //$NON-NLS-1$
+ private static final String HSPACE = "hspace"; //$NON-NLS-1$
private static final String NO_SIZE_VALUE = "0"; //$NON-NLS-1$
private static final String DEFAULT_SIZE_VALUE = "16"; //$NON-NLS-1$
private static final String COMPONENT_NAME = "panelMenuItem"; //$NON-NLS-1$
private static final String PANEL_MENU_END_TAG = ":panelMenu"; //$NON-NLS-1$
private static final String PANEL_MENU_GROUP_END_TAG = ":panelMenuGroup"; //$NON-NLS-1$
- private static final String EMPTY_DIV_STYLE = "display: none;"; //$NON-NLS-1$
+ private static final String EMPTY_DIV_STYLE = "display: none; "; //$NON-NLS-1$
private static final String MARGIN_TOP = "margin-top: 3px; "; //$NON-NLS-1$
+ private static final String WIDTH_100_PERCENTS = "width: 100%; "; //$NON-NLS-1$
/*
* rich:panelMenu attributes for items
@@ -102,6 +109,8 @@
*/
private static String pmi_disabled;
private static String pmi_icon;
+ private static String pmi_iconClass;
+ private static String pmi_iconStyle;
private static String pmi_iconDisabled;
private static String pmi_disabledClass;
private static String pmi_disabledStyle;
@@ -178,47 +187,110 @@
spacerTd.appendChild(spacerImg);
ComponentUtil.setImg(spacerImg, IMG_SPACER_SRC);
setDefaultImgAttributes(spacerImg);
+ spacerTd.setAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT,
+ DEFAULT_SIZE_VALUE);
+ spacerTd.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH,
+ DEFAULT_SIZE_VALUE);
tr.appendChild(spacerTd);
}
}
- nsIDOMElement tdNowrap = visualDocument
+ nsIDOMElement tdNowrapLeft = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- tr.appendChild(tdNowrap);
+ tr.appendChild(tdNowrapLeft);
nsIDOMElement tdLabel = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
tr.appendChild(tdLabel);
-
- String value = sourceElement.getAttribute(LABEL);
- nsIDOMText text = visualDocument.createTextNode(value == null ? EMPTY
- : value);
-
+
+ /*
+ * Item label routine.
+ */
+ Attr labelAttr = null;
+ String labelValue = EMPTY;
+ String bundleValue = EMPTY;
+ String resultValue = EMPTY;
+ if (sourceElement.hasAttribute(LABEL)) {
+ labelAttr = sourceElement.getAttributeNode(LABEL);
+ }
+ if (null != labelAttr) {
+ labelValue = labelAttr.getNodeValue();
+ bundleValue = ComponentUtil.getBundleValue(pageContext,
+ labelAttr);
+ }
+
+ if (attrPresents(labelValue)) {
+ if (attrPresents(bundleValue)) {
+ if (!labelValue.equals(bundleValue)) {
+ resultValue = bundleValue;
+ } else {
+ resultValue = labelValue;
+ }
+ } else {
+ resultValue = labelValue;
+ }
+ } else {
+ if (attrPresents(bundleValue)) {
+ resultValue = bundleValue;
+ } else {
+ resultValue = EMPTY;
+ }
+ }
+ nsIDOMText text = visualDocument.createTextNode(resultValue);
+
tdLabel.appendChild(text);
- nsIDOMElement td = visualDocument
+ nsIDOMElement tdRight = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- tr.appendChild(td);
+ tr.appendChild(tdRight);
nsIDOMElement imgPoints = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ setDefaultImgAttributes(imgPoints);
+ setIcon(childOfPanelMenu, pageContext, imgPoints);
nsIDOMElement imgSpacer1 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_IMG);
-
- tdNowrap.appendChild(imgSpacer1);
setDefaultImgAttributes(imgSpacer1);
ComponentUtil.setImg(imgSpacer1, IMG_SPACER_SRC);
+ tdNowrapLeft.appendChild(imgSpacer1);
+
nsIDOMElement imgSpacer2 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ setDefaultImgAttributes(imgSpacer2);
+ ComponentUtil.setImg(imgSpacer2, IMG_SPACER_SRC);
- setItemClassAndStyle(childOfPanelMenu, table, tr, imgPoints, tdLabel, imgSpacer1);
- setIcon(childOfPanelMenu, pageContext, imgPoints);
- setIconPosition(pm_iconItemTopPosition, td, tdNowrap, imgPoints, imgSpacer2);
+ nsIDOMElement iconCell = tdNowrapLeft;
+ nsIDOMElement emptyCell = tdRight;
+ if (attrPresents(pm_iconItemPosition)) {
+ if (RIGHT.equalsIgnoreCase(pm_iconItemPosition)) {
+ /*
+ * Set icon image on the right
+ */
+ iconCell = tdRight;
+ emptyCell = tdNowrapLeft;
+ }
+ }
+ if (childOfPanelMenu && attrPresents(pm_iconItemTopPosition)) {
+ if (RIGHT.equalsIgnoreCase(pm_iconItemTopPosition)) {
+ /*
+ * Set icon image on the right
+ */
+ iconCell = tdRight;
+ emptyCell = tdNowrapLeft;
+ } else if (LEFT.equalsIgnoreCase(pm_iconItemTopPosition)) {
+ iconCell = tdNowrapLeft;
+ emptyCell = tdRight;
+ }
+ }
+ iconCell.appendChild(imgPoints);
+ emptyCell.appendChild(imgSpacer2);
+ setItemClassAndStyle(childOfPanelMenu, table, tr, iconCell, tdLabel, emptyCell);
+
List<Node> children = ComponentUtil.getChildren(sourceElement);
if (!children.isEmpty()) {
@@ -242,39 +314,14 @@
}
private static void setDefaultImgAttributes(nsIDOMElement element) {
+ element.setAttribute(VSPACE, NO_SIZE_VALUE);
+ element.setAttribute(HSPACE, NO_SIZE_VALUE);
+ element.setAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT,
+ DEFAULT_SIZE_VALUE);
element.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH,
DEFAULT_SIZE_VALUE);
- element.setAttribute("vspace", NO_SIZE_VALUE); //$NON-NLS-1$
- element.setAttribute("hspace", NO_SIZE_VALUE); //$NON-NLS-1$
- element.setAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT,
- DEFAULT_SIZE_VALUE);
}
- private static void setItemImage(nsIDOMElement place, nsIDOMElement image) {
- place.appendChild(image);
- setDefaultImgAttributes(image);
- }
-
- private static void setIconPosition(String iconPosition,
- nsIDOMElement right, nsIDOMElement left, nsIDOMElement imgPoints,
- nsIDOMElement imgSpacer2) {
- if (!(iconPosition == null)) {
- if (iconPosition.equals(RIGHT)) {
- setItemImage(right, imgPoints);
- } else {
- setItemImage(right, imgSpacer2);
- ComponentUtil.setImg(imgSpacer2, IMG_SPACER_SRC);
- if (iconPosition.equals(LEFT)) {
- setItemImage(left, imgPoints);
- }
- }
- } else {
- setItemImage(left, imgPoints);
- setItemImage(right, imgSpacer2);
- ComponentUtil.setImg(imgSpacer2, IMG_SPACER_SRC);
- }
- }
-
/**
* Gets the specified icon from panelMenu or panelMenuGroupItem
*
@@ -293,7 +340,7 @@
if (RichFacesPanelMenuGroupTemplate.DEFAULT_ICON_MAP.containsKey(pmi_icon)) {
imgPath[1] = RichFacesPanelMenuGroupTemplate.DEFAULT_ICON_MAP.get(pmi_icon);
}
- } else if (attrPresents(pm_iconTopDisabledItem)) {
+ } else if (attrPresents(pm_icon)) {
/*
* Icon was set in the panelMenu attribute.
*/
@@ -306,13 +353,18 @@
}
/**
- * Sets the src attribute value for the image.
+ * Sets the src attribute value for the image
*
* @param childOfPanelMenu if the item is the child of panelMenu
* @param pageContext the page context
* @param img the image
*/
private static void setIcon(boolean childOfPanelMenu, VpePageContext pageContext, nsIDOMElement img) {
+
+ /*
+ * The first array element contains specified icon path or default icon name.
+ * The second array element contains default icon path.
+ */
String[] imgPath = {EMPTY, EMPTY};
boolean disabled = (TRUE.equalsIgnoreCase(pmi_disabled))
|| (TRUE.equalsIgnoreCase(pm_disabled));
@@ -333,7 +385,7 @@
if (EMPTY.equalsIgnoreCase(imgPath[0])) {
/*
- * Icon wasn't set. Set default image.
+ * Icon wasn't set. Use default image.
*/
ComponentUtil.setImg(img, IMG_POINTS_SRC);
} else {
@@ -343,14 +395,11 @@
if (RichFacesPanelMenuGroupTemplate.DEFAULT_ICON_MAP.containsKey(imgPath[0])) {
ComponentUtil.setImg(img, imgPath[1]);
} else {
- // TODO ADD SPACER OR IMG PATH
- img.setAttribute(HtmlComponentUtil.HTML_ATR_SRC, HtmlComponentUtil.FILE_PROTOCOL+imgPath[1]);
-// ComponentUtil.setImgFromResources(pageContext, imgPoints, imgPath[1],
-// IMG_SPACER_SRC);
+ String imgFullPath = VpeStyleUtil.addFullPathToImgSrc(imgPath[0], pageContext);
+ img.setAttribute(HtmlComponentUtil.HTML_ATR_SRC, imgFullPath);
}
}
}
-
/**
* Sets the item class and style for the item.
@@ -358,23 +407,25 @@
* @param childOfPanelMenu if the item is the child of panelMenu
* @param table the table
* @param tr the table row
- * @param img1 the first table row column image
- * @param td2 the second table row column
- * @param img3 the third table row column image
+ * @param iconCell the first table row column image
+ * @param labelCell the second table row column
+ * @param emptyCell the third table row column image
*/
private static void setItemClassAndStyle(boolean childOfPanelMenu,
nsIDOMElement table,
nsIDOMElement tr,
- nsIDOMElement img1,
- nsIDOMElement td2,
- nsIDOMElement img3) {
+ nsIDOMElement iconCell,
+ nsIDOMElement labelCell,
+ nsIDOMElement emptyCell) {
String tableStyle = MARGIN_TOP;
+ String iconStyle = EMPTY;
+
String tableClass = EMPTY;
String trClass = EMPTY;
- String img1Class = EMPTY;
- String td2Class = EMPTY;
- String img3Class = EMPTY;
+ String iconCellClass = EMPTY;
+ String labelCellClass = EMPTY;
+ String emptyCellClass = EMPTY;
if (attrPresents(pmi_styleClass)) {
tableClass += SPACE + pmi_styleClass;
@@ -402,9 +453,16 @@
}
} else {
- img1Class = DR_NOWARP_CLASS + SPACE + CSS_ITEM_ICON;
- td2Class = CSS_ITEM_LABEL;
- img3Class = CSS_ITEM_ICON;
+ iconCellClass = DR_NOWARP_CLASS + SPACE + CSS_ITEM_ICON;
+ labelCellClass = CSS_ITEM_LABEL;
+ emptyCellClass = DR_NOWARP_CLASS;
+
+ if (attrPresents(pmi_iconClass)) {
+ iconCellClass += SPACE + pmi_iconClass;
+ }
+ if (attrPresents(pmi_iconStyle)) {
+ iconStyle += SPACE + pmi_iconStyle;
+ }
if (attrPresents(pm_itemClass)) {
tableClass += SPACE + pm_itemClass;
}
@@ -413,9 +471,8 @@
}
if (childOfPanelMenu) {
tableClass += SPACE + CSS_TOP_ITEM;
- img1Class += SPACE + CSS_TOP_ITEM_ICON;
- td2Class += SPACE + CSS_TOP_ITEM_LABEL;
- img3Class += SPACE + CSS_TOP_ITEM_ICON;
+ iconCellClass += SPACE + CSS_TOP_ITEM_ICON;
+ labelCellClass += SPACE + CSS_TOP_ITEM_LABEL;
if (attrPresents(pm_topItemClass)) {
tableClass += SPACE + pm_topItemClass;
}
@@ -426,12 +483,14 @@
}
table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, tableStyle);
+ iconCell.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, iconStyle);
+ labelCell.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, WIDTH_100_PERCENTS);
table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, tableClass);
tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, trClass);
- img3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, img1Class);
- td2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, td2Class);
- img3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, img3Class);
+ iconCell.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, iconCellClass);
+ labelCell.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, labelCellClass);
+ emptyCell.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, emptyCellClass);
}
/**
@@ -484,6 +543,8 @@
*/
pmi_disabled = sourceElement.getAttribute(DISABLED);
pmi_icon = sourceElement.getAttribute(ICON);
+ pmi_iconClass = sourceElement.getAttribute(ICON_CLASS);
+ pmi_iconStyle = sourceElement.getAttribute(ICON_STYLE);
pmi_iconDisabled = sourceElement.getAttribute(ICON_DISABLED);
pmi_disabledClass = sourceElement.getAttribute(DISABLED_CLASS);
pmi_disabledStyle = sourceElement.getAttribute(DISABLED_STYLE);
16 years, 6 months