JBoss Tools SVN: r13743 - in trunk: esb/plugins/org.jboss.tools.esb.project.core/META-INF and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-02-24 00:58:38 -0500 (Tue, 24 Feb 2009)
New Revision: 13743
Added:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportDataModelProvider.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportOperation.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportPage.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportWizard.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
trunk/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF
trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java
Log:
JBIDE-3772 - export wizard for ESB
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2009-02-24 05:19:22 UTC (rev 13742)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2009-02-24 05:58:38 UTC (rev 13743)
@@ -51,7 +51,8 @@
Export-Package: org.jboss.ide.eclipse.as.ui,
org.jboss.ide.eclipse.as.ui.dialogs,
org.jboss.ide.eclipse.as.ui.views.server.extensions,
- org.jboss.ide.eclipse.as.ui.wizards
+ org.jboss.ide.eclipse.as.ui.wizards,
+ org.jboss.tools.as.wst.server.ui.xpl
Bundle-ClassPath: jbossui.jar
Bundle-Activator: org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin
Bundle-Vendor: %Bundle-Vendor.0
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF 2009-02-24 05:19:22 UTC (rev 13742)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF 2009-02-24 05:58:38 UTC (rev 13743)
@@ -34,6 +34,7 @@
Export-Package: org.jboss.tools.esb.core,
org.jboss.tools.esb.core.facet,
org.jboss.tools.esb.core.messages,
+ org.jboss.tools.esb.core.module,
org.jboss.tools.esb.core.runtime,
org.jboss.tools.esb.core.utils
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java 2009-02-24 05:19:22 UTC (rev 13742)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java 2009-02-24 05:58:38 UTC (rev 13743)
@@ -12,25 +12,49 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.internal.ModuleFactory;
+import org.eclipse.wst.server.core.internal.ServerPlugin;
import org.eclipse.wst.server.core.model.ModuleDelegate;
import org.eclipse.wst.server.core.util.ProjectModuleFactoryDelegate;
import org.jboss.tools.esb.core.ESBProjectConstant;
import org.jboss.tools.esb.core.ESBProjectCorePlugin;
public class JBossESBModuleFactory extends ProjectModuleFactoryDelegate {
+ public static final String FACTORY_ID = "org.jboss.tools.esb.project.core.moduleFactory";
+ private static ModuleFactory factory;
+ private static JBossESBModuleFactory factDelegate;
+ public static JBossESBModuleFactory getFactory() {
+ if (factDelegate == null) {
+ ModuleFactory[] factories = ServerPlugin.getModuleFactories();
+ for (int i = 0; i < factories.length; i++) {
+ if (factories[i].getId().equals(FACTORY_ID)) {
+ Object o = factories[i]
+ .getDelegate(new NullProgressMonitor());
+ if (o instanceof JBossESBModuleFactory) {
+ factory = factories[i];
+ factDelegate = (JBossESBModuleFactory) o;
+ return factDelegate;
+ }
+ }
+ }
+ }
+ return factDelegate;
+ }
+
public JBossESBModuleFactory() {
}
@Override
public ModuleDelegate getModuleDelegate(IModule module) {
- if(module instanceof JBossESBModule){
+ if (module instanceof JBossESBModule) {
IProject project = module.getProject();
- return new JBossESBModuleDelegate(project);
+ return new JBossESBModuleDelegate(project);
}
return null;
}
@@ -42,17 +66,19 @@
if (facetProject == null) {
return null;
}
- IProjectFacet esbFacet = ProjectFacetsManager.getProjectFacet(ESBProjectConstant.ESB_PROJECT_FACET);
+ IProjectFacet esbFacet = ProjectFacetsManager
+ .getProjectFacet(ESBProjectConstant.ESB_PROJECT_FACET);
- if(facetProject.hasProjectFacet(esbFacet)){
- JBossESBModule module = new JBossESBModule(project, this, this.getId());
- return new IModule[]{ module };
+ if (facetProject.hasProjectFacet(esbFacet)) {
+ JBossESBModule module = new JBossESBModule(project, this, this
+ .getId());
+ return new IModule[] { module };
}
} catch (CoreException e) {
ESBProjectCorePlugin.getDefault().getLog().log(e.getStatus());
}
return null;
-
+
}
-
+
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF 2009-02-24 05:19:22 UTC (rev 13742)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF 2009-02-24 05:58:38 UTC (rev 13743)
@@ -32,7 +32,8 @@
org.eclipse.jdt.core;bundle-version="3.4.0",
org.jboss.tools.esb.project.core;bundle-version="1.0.0",
org.jboss.tools.common.model.ui;bundle-version="2.0.0",
- org.eclipse.jdt.ui;bundle-version="3.4.1"
+ org.eclipse.jdt.ui;bundle-version="3.4.1",
+ org.jboss.ide.eclipse.as.ui;bundle-version="1.0.0"
Eclipse-LazyStart: true
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.esb.project.ui
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml 2009-02-24 05:19:22 UTC (rev 13742)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml 2009-02-24 05:58:38 UTC (rev 13743)
@@ -73,7 +73,29 @@
<classpathContainerPage
class="org.jboss.tools.esb.project.ui.wizards.pages.JBossESBRuntimeContainerPage"
id="org.jboss.esb.runtime.classpath"
- name="JBoss ESB Libraries">
+ name="JBoss ESB Libraries">
</classpathContainerPage>
</extension>
+
+
+ <extension
+ point="org.eclipse.ui.exportWizards">
+ <category
+ name="ESB"
+ id="org.jboss.tools.esb.category">
+ </category>
+ <wizard
+ name="ESB File"
+ icon="icons/obj16/esb_module.gif"
+ class="org.jboss.tools.esb.project.ui.wizards.export.ESBComponentExportWizard"
+ category="org.jboss.tools.esb.category"
+ id="org.jboss.tools.esb.project.ui.wizards.temp.ESBExportWizard">
+ <description>
+ ESB File
+ </description>
+ <selection
+ class="org.eclipse.core.resources.IResource">
+ </selection>
+ </wizard>
+ </extension>
</plugin>
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties 2009-02-24 05:19:22 UTC (rev 13742)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties 2009-02-24 05:58:38 UTC (rev 13743)
@@ -65,3 +65,7 @@
ESBProjectWizard_Title=New ESB Project Wizard
+ESBExportWizard_NotValidProject=Project "{0}" is not a valid ESB Project
+ESBExportWizard_Title=ESB Export
+ESBExportWizard_Description=Export an ESB project to the local file system.
+ESBExportWizard_ESBProject=ESB Project:
\ No newline at end of file
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java 2009-02-24 05:19:22 UTC (rev 13742)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java 2009-02-24 05:58:38 UTC (rev 13743)
@@ -121,9 +121,12 @@
public static String ESBProjectWizard_Title;
+ public static String ESBExportWizard_NotValidProject;
+ public static String ESBExportWizard_Title;
+ public static String ESBExportWizard_Description;
+ public static String ESBExportWizard_ESBProject;
+
-
-
static {
NLS.initializeMessages(BUNDLE_NAME, JBossESBUIMessages.class);
}
Added: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportDataModelProvider.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportDataModelProvider.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportDataModelProvider.java 2009-02-24 05:58:38 UTC (rev 13743)
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * 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.esb.project.ui.wizards.export;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentExportDataModelProvider;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
+import org.jboss.tools.esb.core.ESBProjectConstant;
+import org.jboss.tools.esb.core.utils.JBossESBProjectUtil;
+import org.jboss.tools.esb.project.ui.ESBProjectPlugin;
+import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
+
+public class ESBComponentExportDataModelProvider extends
+ J2EEComponentExportDataModelProvider {
+
+ public IDataModelOperation getDefaultOperation() {
+ return new ESBComponentExportOperation(model);
+ }
+
+ public Set getPropertyNames() {
+ return super.getPropertyNames();
+ }
+
+ public Object getDefaultProperty(String propertyName) {
+ return super.getDefaultProperty(propertyName);
+ }
+
+ protected String getProjectType() {
+ return ESBProjectConstant.ESB_PROJECT_FACET;
+ }
+
+ protected String getWrongComponentTypeString(String projectName) {
+ return NLS.bind(JBossESBUIMessages.ESBExportWizard_NotValidProject, projectName);
+ }
+
+ protected String getModuleExtension() {
+ return ".esb"; //$NON-NLS-1$
+ }
+
+ public IStatus validate(String propertyName) {
+ if (PROJECT_NAME.equals(propertyName)) {
+ String projectName = (String) model.getProperty(PROJECT_NAME);
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ if( project != null ) {
+ if(JBossESBProjectUtil.isESBProject(project))
+ return Status.OK_STATUS;
+ }
+ return new Status(IStatus.ERROR, ESBProjectPlugin.PLUGIN_ID,
+ NLS.bind(JBossESBUIMessages.ESBExportWizard_NotValidProject, projectName));
+ }
+ return super.validate(propertyName);
+ }
+
+ public DataModelPropertyDescriptor[] getValidPropertyDescriptors(String propertyName) {
+ if (propertyName.equals(PROJECT_NAME)) {
+ List componentNames = new ArrayList();
+ IVirtualComponent[] wbComps = ComponentUtilities.getAllWorkbenchComponents();
+
+ List relevantComponents = new ArrayList();
+ IProject aProj = null;
+ for (int i = 0; i < wbComps.length; i++) {
+ aProj = wbComps[i].getProject();
+ if( JBossESBProjectUtil.isESBProject(aProj) ) {
+ relevantComponents.add(wbComps[i]);
+ getComponentMap().put(wbComps[i].getName(), wbComps[i]);
+ }
+ }
+
+ if (relevantComponents == null || relevantComponents.size() == 0)
+ return null;
+
+ for (int j = 0; j < relevantComponents.size(); j++) {
+ componentNames.add(((IVirtualComponent) relevantComponents.get(j)).getName());
+ }
+ String[] names = (String[]) componentNames.toArray(new String[componentNames.size()]);
+
+ return DataModelPropertyDescriptor.createDescriptors(names);
+ }
+ return super.getValidPropertyDescriptors(propertyName);
+ }
+}
Added: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportOperation.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportOperation.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportOperation.java 2009-02-24 05:58:38 UTC (rev 13743)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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.esb.project.ui.wizards.export;
+
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.jboss.tools.as.wst.server.ui.xpl.J2EEModuleExportOperation;
+import org.jboss.tools.esb.core.ESBProjectConstant;
+
+public class ESBComponentExportOperation extends J2EEModuleExportOperation {
+ public ESBComponentExportOperation() {
+ super();
+ }
+
+ public ESBComponentExportOperation(IDataModel model) {
+ super(model);
+ }
+
+ protected String getModuleTypeID() {
+ return ESBProjectConstant.ESB_PROJECT_FACET;
+ }
+
+ protected String archiveString() {
+ return "ESB File";
+ }
+}
Added: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportPage.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportPage.java 2009-02-24 05:58:38 UTC (rev 13743)
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * 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.esb.project.ui.wizards.export;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleExportPage;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.jboss.tools.common.model.ui.ModelUIImages;
+import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
+
+public class ESBComponentExportPage extends J2EEModuleExportPage {
+ public ESBComponentExportPage(IDataModel model, String pageName, IStructuredSelection selection) {
+ super(model, pageName, selection);
+ setTitle(JBossESBUIMessages.ESBExportWizard_Title);
+ setDescription(JBossESBUIMessages.ESBExportWizard_Description);
+ setImageDescriptor(ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_NEW_PROJECT));
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getProjectImportLabel()
+ */
+ protected String getComponentLabel() {
+ return JBossESBUIMessages.ESBExportWizard_ESBProject;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFilterExpression()
+ */
+ protected String[] getFilterExpression() {
+ return new String[]{"*.esb"}; //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEExportPage#isMetaTypeSupported(java.lang.Object)
+ */
+ protected boolean isMetaTypeSupported(Object o) {
+ return true;
+ }
+
+ protected String getCompnentID() {
+ return "test9"; //$NON-NLS-1$
+ }
+
+}
Added: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportWizard.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportWizard.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/export/ESBComponentExportWizard.java 2009-02-24 05:58:38 UTC (rev 13743)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * 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.esb.project.ui.wizards.export;
+
+import org.eclipse.jst.j2ee.internal.wizard.J2EEArtifactExportWizard;
+import org.eclipse.ui.IExportWizard;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
+import org.jboss.tools.common.model.ui.ModelUIImages;
+
+public class ESBComponentExportWizard extends J2EEArtifactExportWizard
+ implements IExportWizard {
+
+ public ESBComponentExportWizard() {
+ super();
+ }
+
+ public ESBComponentExportWizard(IDataModel model) {
+ super(model);
+ }
+
+ protected IDataModelProvider getDefaultProvider() {
+ return new ESBComponentExportDataModelProvider();
+ }
+
+ public void doAddPages() {
+ addPage(new ESBComponentExportPage(getDataModel(), MAIN_PG, getSelection()));
+ }
+
+ protected void doInit() {
+ setDefaultPageImageDescriptor(ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_NEW_PROJECT));
+ }
+}
16 years, 10 months
JBoss Tools SVN: r13742 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: jbossui/org/jboss/tools/as/wst/server/ui/xpl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-02-24 00:19:22 -0500 (Tue, 24 Feb 2009)
New Revision: 13742
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/J2EEModuleExportOperation.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
Log:
JBIDE-3772 - superclass impl
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2009-02-24 05:17:31 UTC (rev 13741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2009-02-24 05:19:22 UTC (rev 13742)
@@ -45,7 +45,8 @@
org.eclipse.ui.navigator;bundle-version="3.3.100",
org.eclipse.ui.views.log;bundle-version="1.0.0",
org.jboss.tools.jmx.ui;bundle-version="0.2.2",
- org.jboss.tools.jmx.core;bundle-version="0.2.1"
+ org.jboss.tools.jmx.core;bundle-version="0.2.1",
+ org.eclipse.jst.j2ee.core;bundle-version="1.1.202"
Eclipse-LazyStart: true
Export-Package: org.jboss.ide.eclipse.as.ui,
org.jboss.ide.eclipse.as.ui.dialogs,
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/J2EEModuleExportOperation.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/J2EEModuleExportOperation.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/J2EEModuleExportOperation.java 2009-02-24 05:19:22 UTC (rev 13742)
@@ -0,0 +1,434 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/**
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=265798
+ * JBIDE-3772
+ */
+
+package org.jboss.tools.as.wst.server.ui.xpl;
+
+import static org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentExportDataModelProperties.ARCHIVE_DESTINATION;
+import static org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentExportDataModelProperties.COMPONENT;
+import static org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentExportDataModelProperties.EXPORT_SOURCE_FILES;
+import static org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentExportDataModelProperties.OPTIMIZE_FOR_SPECIFIC_RUNTIME;
+import static org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentExportDataModelProperties.RUNTIME_SPECIFIC_PARTICIPANTS;
+import static org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentExportDataModelProperties.RUN_BUILD;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceRuleFactory;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.MultiRule;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
+import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentExportDataModelProperties.IArchiveExportParticipantData;
+import org.eclipse.jst.j2ee.internal.plugin.LibCopyBuilder;
+import org.eclipse.jst.j2ee.internal.project.ProjectSupportResourceHandler;
+import org.eclipse.jst.server.core.IEnterpriseApplication;
+import org.eclipse.jst.server.core.IJ2EEModule;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.ServerUtil;
+import org.eclipse.wst.server.core.model.IModuleFile;
+import org.eclipse.wst.server.core.model.IModuleFolder;
+import org.eclipse.wst.server.core.model.IModuleResource;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
+
+public abstract class J2EEModuleExportOperation extends AbstractDataModelOperation {
+
+ protected IProgressMonitor progressMonitor;
+ private IVirtualComponent component;
+ private IModule module;
+ private IPath destinationPath;
+ private boolean exportSource = false;
+
+ public J2EEModuleExportOperation() {
+ super();
+ }
+
+ public J2EEModuleExportOperation(IDataModel model) {
+ super(model);
+ }
+
+ protected final int REFRESH_WORK = 100;
+ protected final int JAVA_BUILDER_WORK = 100;
+ protected final int LIB_BUILDER_WORK = 100;
+ protected final int EXPORT_WORK = 1000;
+ protected final int CLOSE_WORK = 10;
+ protected final int SINGLE_PARTICIPANT_WORK = 200;
+
+ protected int computeTotalWork() {
+ int totalWork = REFRESH_WORK;
+ if (model.getBooleanProperty(RUN_BUILD)) {
+ totalWork += JAVA_BUILDER_WORK + LIB_BUILDER_WORK;
+ }
+ totalWork += EXPORT_WORK + CLOSE_WORK;
+
+ final IDataModel dm = getDataModel();
+
+ if( dm.getProperty( OPTIMIZE_FOR_SPECIFIC_RUNTIME ) == Boolean.TRUE )
+ {
+ final List<IArchiveExportParticipantData> extensions
+ = (List<IArchiveExportParticipantData>) dm.getProperty( RUNTIME_SPECIFIC_PARTICIPANTS );
+
+ totalWork += extensions.size() * SINGLE_PARTICIPANT_WORK;
+ }
+
+ return totalWork;
+ }
+
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ setComponent((IVirtualComponent) model.getProperty(COMPONENT));
+ setDestinationPath(new Path(model.getStringProperty(ARCHIVE_DESTINATION)));
+ setExportSource(model.getBooleanProperty(EXPORT_SOURCE_FILES));
+
+ try
+ {
+ monitor.beginTask(ProjectSupportResourceHandler.getString(ProjectSupportResourceHandler.Exporting_archive, new Object [] { getDestinationPath().lastSegment() }), computeTotalWork());
+ setProgressMonitor(monitor);
+
+ try {
+ // defect 240999
+ component.getProject().refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor, REFRESH_WORK));
+ if (model.getBooleanProperty(RUN_BUILD)) {
+ runNecessaryBuilders(component, new SubProgressMonitor(monitor, JAVA_BUILDER_WORK + LIB_BUILDER_WORK));
+ }
+ export();
+ } catch (Exception e) {
+ monitor.worked(CLOSE_WORK);
+ throw new ExecutionException("Error Exporting " + archiveString(), e);
+ }
+
+ final IDataModel dm = getDataModel();
+
+ if( dm.getProperty( OPTIMIZE_FOR_SPECIFIC_RUNTIME ) == Boolean.TRUE )
+ {
+ for( IArchiveExportParticipantData extData
+ : (List<IArchiveExportParticipantData>) dm.getProperty( RUNTIME_SPECIFIC_PARTICIPANTS ) )
+ {
+ final IDataModelOperation op
+ = extData.getParticipant().createOperation( extData.getDataModel() );
+
+ op.execute( null, null );
+ monitor.worked( SINGLE_PARTICIPANT_WORK );
+ }
+ }
+ }
+ finally
+ {
+ monitor.done();
+ }
+
+ return OK_STATUS;
+ }
+
+ protected abstract String archiveString();
+
+ protected void setProgressMonitor(IProgressMonitor newProgressMonitor) {
+ progressMonitor = newProgressMonitor;
+ }
+
+ protected IProgressMonitor getProgressMonitor() {
+ return progressMonitor;
+ }
+
+ private void setComponent(IVirtualComponent newComponent) {
+ component = newComponent;
+ setModule();
+ }
+
+ protected IVirtualComponent getComponent() {
+ if (component == null)
+ component = (IVirtualComponent) model.getProperty(COMPONENT);
+ return component;
+ }
+
+ protected IPath getDestinationPath() {
+ return destinationPath;
+ }
+
+ protected void setDestinationPath(IPath newDestinationPath) {
+ destinationPath = newDestinationPath;
+ }
+
+ protected boolean isExportSource() {
+ return exportSource;
+ }
+
+ protected void setExportSource(boolean newExportSource) {
+ exportSource = newExportSource;
+ }
+
+ protected void setModule() {
+ String moduleType = getModuleTypeID();
+ if( component != null && component.getProject() != null && moduleType != null) {
+ IModule[] modules = ServerUtil.getModules(component.getProject());
+ for( int i = 0; i < modules.length; i++ ) {
+ if( modules[i].getModuleType().getId().equals(moduleType)) {
+ module = modules[i];
+ return;
+ }
+ }
+ }
+ module = null;
+ Object o = module;
+ }
+
+ protected abstract String getModuleTypeID();
+
+
+ /* Return null to skip this child */
+ protected /* abstract */ String getChildURI(IModule parent, IModule child) {
+ IEnterpriseApplication app = (IEnterpriseApplication)parent.loadAdapter(IEnterpriseApplication.class, new NullProgressMonitor());
+ if( app != null ) {
+ return app.getURI(child);
+ }
+ return null;
+ }
+
+ protected void runNecessaryBuilders(IVirtualComponent component, IProgressMonitor monitor) throws CoreException {
+ try{
+ monitor.beginTask(null, JAVA_BUILDER_WORK + LIB_BUILDER_WORK);
+ if(!component.isBinary()){
+ IProject project = component.getProject();
+ IProjectDescription description = project.getDescription();
+ ICommand javaBuilder = getJavaCommand(description);
+ if (javaBuilder != null) {
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, JavaCore.BUILDER_ID, javaBuilder.getArguments(), new SubProgressMonitor(monitor, JAVA_BUILDER_WORK));
+ }
+ ICommand libCopyBuilder = getLibCopyBuilder(description);
+ if (null != libCopyBuilder) {
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, LibCopyBuilder.BUILDER_ID, libCopyBuilder.getArguments(), new SubProgressMonitor(monitor, LIB_BUILDER_WORK));
+ }
+ }
+ } finally {
+ monitor.done();
+ }
+ }
+
+ /**
+ * Find the specific Java command amongst the build spec of a given description
+ */
+ protected ICommand getJavaCommand(IProjectDescription description) throws CoreException {
+ if (description == null) {
+ return null;
+ }
+
+ ICommand[] commands = description.getBuildSpec();
+ for (int i = 0; i < commands.length; ++i) {
+ if (commands[i].getBuilderName().equals(JavaCore.BUILDER_ID)) {
+ return commands[i];
+ }
+ }
+ return null;
+ }
+
+ protected ICommand getLibCopyBuilder(IProjectDescription description) throws CoreException {
+ if (description == null) {
+ return null;
+ }
+
+ ICommand[] commands = description.getBuildSpec();
+ for (int i = 0; i < commands.length; ++i) {
+ if (commands[i].getBuilderName().equals(LibCopyBuilder.BUILDER_ID)) {
+ return commands[i];
+ }
+ }
+ return null;
+
+ }
+
+ public ISchedulingRule getSchedulingRule() {
+ Set projs = gatherDependentProjects(getComponent(), new HashSet());
+ ISchedulingRule combinedRule = null;
+ IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory();
+ for (Iterator iter = projs.iterator(); iter.hasNext();) {
+ IProject proj = (IProject) iter.next();
+ ISchedulingRule rule = ruleFactory.createRule(proj);
+ combinedRule = MultiRule.combine(rule, combinedRule);
+ }
+ combinedRule = MultiRule.combine(ruleFactory.buildRule(), combinedRule);
+
+ return combinedRule;
+ }
+
+ private Set gatherDependentProjects(IVirtualComponent comp, Set projs) {
+ if (!projs.contains(comp.getProject())) {
+ projs.add(comp.getProject());
+ IVirtualReference[] refs = comp.getReferences();
+ for (int i = 0; i < refs.length; i++) {
+ IVirtualReference refComp = refs[i];
+ projs.addAll(gatherDependentProjects(refComp.getReferencedComponent(), projs));
+ }
+ }
+ return projs;
+ }
+
+
+
+ protected void export() throws SaveFailureException, CoreException, InvocationTargetException, InterruptedException {
+ if( module == null )
+ throw new SaveFailureException(); // TODO add some real message
+ try {
+ File dest = getDestinationPath().toFile();
+ File parent = dest.getParentFile();
+
+ /* Prepare the streams */
+ if (dest.exists() && dest.isDirectory()) {
+ throw new IOException("The specified file: " + dest.getAbsolutePath() + " exists and is a directory");
+ }
+ if (parent != null)
+ parent.mkdirs();
+ java.io.OutputStream out = new java.io.FileOutputStream(dest);
+ ZipStreamModuleSaveAdapterImpl saver = new ZipStreamModuleSaveAdapterImpl(out);
+
+ ModuleDelegate moduleDelegate = (ModuleDelegate)module.loadAdapter(ModuleDelegate.class, new NullProgressMonitor());
+ addResources(saver, moduleDelegate.members());
+ addChildren(saver, module, moduleDelegate.getChildModules());
+ saver.finish();
+ } catch( Exception e ) {
+ e.printStackTrace();
+ throw new SaveFailureException();
+ }
+ }
+
+ protected void addChildren(ZipStreamModuleSaveAdapterImpl saver, IModule parent, IModule[] children ) throws IOException, SaveFailureException, CoreException {
+ if( children != null ) {
+ for( int i = 0; i < children.length; i++ ) {
+ String path = getChildURI(parent, children[i]);
+ ModuleDelegate childDelegate = (ModuleDelegate)children[i].
+ loadAdapter(ModuleDelegate.class, new NullProgressMonitor());
+ IJ2EEModule tempMod = (IJ2EEModule)children[i].loadAdapter(IJ2EEModule.class, new NullProgressMonitor());
+ boolean isBinary = tempMod.isBinary();
+ if( path != null ) {
+ if( isBinary ) {
+ addResources(saver, childDelegate.members());
+ } else {
+ ZipStreamModuleSaveAdapterImpl childSaver = saver.createNestedSaveAdapter(path);
+ addResources(childSaver, childDelegate.members());
+ addChildren(childSaver, children[i], childDelegate.getChildModules());
+ childSaver.finish();
+ }
+ }
+ }
+ }
+ }
+
+ protected void addResources(ZipStreamModuleSaveAdapterImpl saver, IModuleResource[] resources) throws SaveFailureException {
+ for( int i = 0; i < resources.length; i++ ) {
+ if( resources[i] instanceof IModuleFile ) {
+ saver.save(resources[i]);
+ } else if( resources[i] instanceof IModuleFolder ) {
+ addResources(saver, ((IModuleFolder)resources[i]).members());
+ }
+ }
+ }
+
+
+ public static class ZipStreamModuleSaveAdapterImpl {
+ protected OutputStream destinationStream;
+ /** Used internally */
+ protected ZipOutputStream zipOutputStream;
+
+ public ZipStreamModuleSaveAdapterImpl(OutputStream out) {
+ destinationStream = out;
+ zipOutputStream = new ZipOutputStream(out);
+ }
+
+ public void close() throws IOException {
+ getDestinationStream().close();
+ }
+
+ protected ZipStreamModuleSaveAdapterImpl createNestedSaveAdapter(String entry) throws IOException {
+ ZipEntry nest = new ZipEntry(entry);
+ getZipOutputStream().putNextEntry(nest);
+ return new ZipStreamModuleSaveAdapterImpl(getZipOutputStream());
+ }
+
+ public void finish() throws IOException {
+ getZipOutputStream().finish();
+ //If this is not nested, close the stream to free up the resource
+ //otherwise, don't close it because the parent may not be done
+ if (!(getDestinationStream() instanceof ZipOutputStream))
+ getDestinationStream().close();
+ }
+
+ public java.io.OutputStream getDestinationStream() {
+ return destinationStream;
+ }
+
+ protected java.util.zip.ZipOutputStream getZipOutputStream() {
+ return zipOutputStream;
+ }
+
+ protected void save(IModuleResource resource) throws SaveFailureException {
+ if( resource instanceof IModuleFile ) {
+ File f = (File)((IModuleFile)resource).getAdapter(File.class);
+ if( f == null ) {
+ IFile ifile = (IFile)((IModuleFile)resource).getAdapter(IFile.class);
+ if( ifile != null )
+ f = ifile.getLocation().toFile();
+ }
+ saveFile(f, resource.getModuleRelativePath().append(resource.getName()));
+ }
+ }
+
+ protected void saveFile(File f, IPath entryPath) throws SaveFailureException{
+ try {
+ ZipEntry entry = new ZipEntry(entryPath.toString());
+ if (f.lastModified() > 0)
+ entry.setTime(f.lastModified());
+ getZipOutputStream().putNextEntry(entry);
+ ArchiveUtil.copy(new FileInputStream(f), getZipOutputStream());
+ getZipOutputStream().closeEntry();
+ } catch (IOException e) {
+ throw new SaveFailureException(e);
+ }
+ }
+ }
+
+ public static class SaveFailureException extends Exception {
+ public SaveFailureException() { super(); }
+ public SaveFailureException(Exception parent) { super(parent); }
+ }
+
+}
16 years, 10 months
JBoss Tools SVN: r13741 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core: jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-02-24 00:17:31 -0500 (Tue, 24 Feb 2009)
New Revision: 13741
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/RunJarContainerWrapper.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-3770 - changed ids to non-internal
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/RunJarContainerWrapper.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/RunJarContainerWrapper.java 2009-02-24 05:12:25 UTC (rev 13740)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/RunJarContainerWrapper.java 2009-02-24 05:17:31 UTC (rev 13741)
@@ -17,7 +17,7 @@
public class RunJarContainerWrapper {
public static final String ID = "org.jboss.ide.eclipse.as.core.server.launch.runJarContainer";
- public static final String RESOLVER_ID = "org.jboss.ide.eclipse.as.core.server.internal.launch.runtimeCPEResolver";
+ public static final String RESOLVER_ID = "org.jboss.ide.eclipse.as.core.server.launch.runJarContainer.resolver";
public static class RunJarContainerInitializer extends ClasspathContainerInitializer {
public void initialize(IPath containerPath, IJavaProject project)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2009-02-24 05:12:25 UTC (rev 13740)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2009-02-24 05:17:31 UTC (rev 13741)
@@ -710,15 +710,15 @@
point="org.eclipse.jdt.core.classpathContainerInitializer">
<classpathContainerInitializer
class="org.jboss.ide.eclipse.as.core.server.internal.launch.RunJarContainerWrapper$RunJarContainerInitializer"
- id="org.jboss.ide.eclipse.as.core.server.internal.launch.runJarContainer">
+ id="org.jboss.ide.eclipse.as.core.server.launch.runJarContainer">
</classpathContainerInitializer>
</extension>
<extension
point="org.eclipse.jdt.launching.runtimeClasspathEntryResolvers">
<runtimeClasspathEntryResolver
class="org.jboss.ide.eclipse.as.core.server.internal.launch.RunJarContainerWrapper$RunJarResolver"
- container="org.jboss.ide.eclipse.as.core.server.internal.launch.runJarContainer"
- id="org.jboss.ide.eclipse.as.core.server.internal.launch.runJarContainer.resolver">
+ container="org.jboss.ide.eclipse.as.core.server.launch.runJarContainer"
+ id="org.jboss.ide.eclipse.as.core.server.launch.runJarContainer.resolver">
</runtimeClasspathEntryResolver>
</extension>
<extension
16 years, 10 months
JBoss Tools SVN: r13740 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-02-24 00:12:25 -0500 (Tue, 24 Feb 2009)
New Revision: 13740
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/RunJarContainerWrapper.java
Log:
JBIDE-3770 - changed id to non-internal
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/RunJarContainerWrapper.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/RunJarContainerWrapper.java 2009-02-23 19:00:52 UTC (rev 13739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/RunJarContainerWrapper.java 2009-02-24 05:12:25 UTC (rev 13740)
@@ -16,7 +16,7 @@
import org.eclipse.wst.server.core.ServerCore;
public class RunJarContainerWrapper {
- public static final String ID = "org.jboss.ide.eclipse.as.core.server.internal.launch.runJarContainer";
+ public static final String ID = "org.jboss.ide.eclipse.as.core.server.launch.runJarContainer";
public static final String RESOLVER_ID = "org.jboss.ide.eclipse.as.core.server.internal.launch.runtimeCPEResolver";
public static class RunJarContainerInitializer extends ClasspathContainerInitializer {
16 years, 10 months
JBoss Tools SVN: r13739 - in trunk/seam/tests: org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-02-23 14:00:52 -0500 (Mon, 23 Feb 2009)
New Revision: 13739
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam12XTestSuite.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam20XTestSuite.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam12XOperationsTestSuite.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20XOperationsTestSuite.java
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegateTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2850 test that can be ran with different Seam versions moved to separated suits to provide a way to run them separately
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java 2009-02-23 18:18:50 UTC (rev 13738)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java 2009-02-23 19:00:52 UTC (rev 13739)
@@ -13,6 +13,8 @@
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.jboss.tools.seam.core.test.project.facet.Seam12XTestSuite;
+import org.jboss.tools.seam.core.test.project.facet.Seam20XTestSuite;
import org.jboss.tools.seam.core.test.project.facet.Seam2FacetInstallDelegateTest;
import org.jboss.tools.seam.core.test.project.facet.SeamFacetInstallDelegateTest;
import org.jboss.tools.seam.core.test.project.facet.SeamRuntimeListConverterTest;
@@ -35,11 +37,10 @@
suite.addTestSuite(SeamEARTest.class);
suite.addTestSuite(SeamRuntimeListConverterTest.class);
suite.addTestSuite(SeamRuntimeManagerTest.class);
- suite.addTestSuite(SeamFacetInstallDelegateTest.class);
suite.addTest(SeamValidatorsAllTests.suite());
suite.addTest(SeamRefactoringAllTests.suite());
- suite.addTestSuite(Seam2FacetInstallDelegateTest.class);
-
+ suite.addTest(Seam12XTestSuite.suite());
+ suite.addTest(Seam20XTestSuite.suite());
return suite;
}
}
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam12XTestSuite.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam12XTestSuite.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam12XTestSuite.java 2009-02-23 19:00:52 UTC (rev 13739)
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.seam.core.test.project.facet;
+
+
+import junit.framework.TestSuite;
+
+public class Seam12XTestSuite {
+ public static TestSuite suite() {
+ TestSuite suite = new TestSuite("Seam 1.2.X tests");
+ suite.addTestSuite(SeamFacetInstallDelegateTest.class);
+ return suite;
+ }
+}
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam12XTestSuite.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam20XTestSuite.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam20XTestSuite.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam20XTestSuite.java 2009-02-23 19:00:52 UTC (rev 13739)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.seam.core.test.project.facet;
+
+import junit.framework.TestSuite;
+
+
+/**
+ * @author eskimo
+ *
+ */
+public class Seam20XTestSuite {
+ public static TestSuite suite() {
+ TestSuite suite = new TestSuite("Seam 2.0.X tests");
+ suite.addTestSuite(Seam2FacetInstallDelegateTest.class);
+ return suite;
+ }
+}
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam20XTestSuite.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegateTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegateTest.java 2009-02-23 18:18:50 UTC (rev 13738)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegateTest.java 2009-02-23 19:00:52 UTC (rev 13739)
@@ -19,6 +19,7 @@
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.internal.core.project.facet.SeamFacetPreInstallDelegate;
+import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
public class SeamFacetInstallDelegateTest extends AbstractSeamFacetTest {
@@ -45,7 +46,7 @@
createSeamDataModel.setProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME, "x.y.z");
final IFacetedProject fproj = createSeamProject("customProject",createSeamDataModel);
-
+ JobUtils.waitForIdle(500);
assertTrue(fproj.getProject().findMember("src/action/x/y/z").exists());
}
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2009-02-23 18:18:50 UTC (rev 13738)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2009-02-23 19:00:52 UTC (rev 13739)
@@ -25,8 +25,10 @@
import org.jboss.tools.seam.ui.test.wizard.PackageNamesTest;
import org.jboss.tools.seam.ui.test.wizard.Seam12EARNewOperationTest;
import org.jboss.tools.seam.ui.test.wizard.Seam12WARNewOperationTest;
+import org.jboss.tools.seam.ui.test.wizard.Seam12XOperationsTestSuite;
import org.jboss.tools.seam.ui.test.wizard.Seam20EARNewOperationTest;
import org.jboss.tools.seam.ui.test.wizard.Seam20WARNewOperationTest;
+import org.jboss.tools.seam.ui.test.wizard.Seam20XOperationsTestSuite;
import org.jboss.tools.seam.ui.test.wizard.SeamActionNewWizardTest;
import org.jboss.tools.seam.ui.test.wizard.SeamFormNewWizardTest;
import org.jboss.tools.seam.ui.test.wizard.SeamProjectNewWizardTest;
@@ -54,13 +56,9 @@
suite.addTestSuite(SeamELContentAssistJbide1676Test.class);
suite.addTestSuite(SeamELContentAssistJbide1645Test.class);
suite.addTest(new ProjectImportTestSetup(new TestSuite(SeamSettingsPreferencesPageTest.class), "org.jboss.tools.seam.ui.test", "projects/TestSeamSettingsPreferencesPage", "TestSeamSettingsPreferencesPage"));
-
- suite.addTestSuite(Seam12EARNewOperationTest.class);
- suite.addTestSuite(Seam12WARNewOperationTest.class);
- suite.addTestSuite(Seam20EARNewOperationTest.class);
- suite.addTestSuite(Seam20WARNewOperationTest.class);
suite.addTestSuite(PackageNamesTest.class);
-
+ suite.addTest(Seam20XOperationsTestSuite.suite());
+ suite.addTest(Seam12XOperationsTestSuite.suite());
return suite;
}
}
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam12XOperationsTestSuite.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam12XOperationsTestSuite.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam12XOperationsTestSuite.java 2009-02-23 19:00:52 UTC (rev 13739)
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.seam.ui.test.wizard;
+
+import junit.framework.TestSuite;
+
+/**
+ * @author eskimo
+ *
+ */
+public class Seam12XOperationsTestSuite {
+ public static TestSuite suite() {
+ TestSuite suite = new TestSuite();
+ suite.setName("Seam 1.2.X Operations Tests");
+ suite.addTestSuite(Seam12EARNewOperationTest.class);
+ suite.addTestSuite(Seam12WARNewOperationTest.class);
+ return suite;
+ }
+}
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam12XOperationsTestSuite.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20XOperationsTestSuite.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20XOperationsTestSuite.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20XOperationsTestSuite.java 2009-02-23 19:00:52 UTC (rev 13739)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.seam.ui.test.wizard;
+
+import junit.framework.TestSuite;
+
+/**
+ *
+ * @author eskimo
+ */
+public class Seam20XOperationsTestSuite {
+
+ public static TestSuite suite() {
+ TestSuite suite = new TestSuite();
+ suite.setName("Seam 2.0.X Operations Test");
+ suite.addTestSuite(Seam20EARNewOperationTest.class);
+ suite.addTestSuite(Seam20WARNewOperationTest.class);
+ return suite;
+ }
+
+}
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20XOperationsTestSuite.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 10 months
JBoss Tools SVN: r13738 - workspace/snjeza/seam-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-02-23 13:18:50 -0500 (Mon, 23 Feb 2009)
New Revision: 13738
Modified:
workspace/snjeza/seam-examples/booking-mavenized-2.1.1.zip
Log:
JBIDE-3711 Investigate why JBoss 5 doesn't seem to like our seam 2 deployments
Modified: workspace/snjeza/seam-examples/booking-mavenized-2.1.1.zip
===================================================================
(Binary files differ)
16 years, 10 months
JBoss Tools SVN: r13737 - workspace/snjeza/seam-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-02-23 12:58:05 -0500 (Mon, 23 Feb 2009)
New Revision: 13737
Modified:
workspace/snjeza/seam-examples/booking-mavenized-2.1.1.zip
Log:
JBIDE-3711 Investigate why JBoss 5 doesn't seem to like our seam 2 deployments
Modified: workspace/snjeza/seam-examples/booking-mavenized-2.1.1.zip
===================================================================
(Binary files differ)
16 years, 10 months
JBoss Tools SVN: r13736 - trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-02-23 12:42:42 -0500 (Mon, 23 Feb 2009)
New Revision: 13736
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
Log:
Adjusting junit tests
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2009-02-23 17:33:44 UTC (rev 13735)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2009-02-23 17:42:42 UTC (rev 13736)
@@ -186,7 +186,9 @@
TestUtil.waitForJobs();
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, EDITOR_ID, true);
-
+ //here we wait for inintialization VPE controller
+ TestUtil.getVpeController((JSPMultiPageEditor) editor);
+
assertNotNull(editor);
TestUtil.waitForJobs();
16 years, 10 months
JBoss Tools SVN: r13735 - workspace/snjeza/seam-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-02-23 12:33:44 -0500 (Mon, 23 Feb 2009)
New Revision: 13735
Modified:
workspace/snjeza/seam-examples/booking-mavenized-2.1.1.zip
Log:
JBIDE-3711 Investigate why JBoss 5 doesn't seem to like our seam 2 deployments
Modified: workspace/snjeza/seam-examples/booking-mavenized-2.1.1.zip
===================================================================
(Binary files differ)
16 years, 10 months
JBoss Tools SVN: r13734 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-02-23 12:06:21 -0500 (Mon, 23 Feb 2009)
New Revision: 13734
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-626 - updating the "External Stylesheets" section;
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2009-02-23 17:05:14 UTC (rev 13733)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2009-02-23 17:06:21 UTC (rev 13734)
@@ -196,9 +196,10 @@
</listitem>
</itemizedlist>
- <para>Notice, that code completion for EL variables has icons illustrating what they are from.
- Currently it's performed for resource bundles, JSF and Seam components.</para>
-
+ <para>Notice, that code completion for EL variables has icons illustrating what they are
+ from. Currently it's performed for resource bundles, JSF and Seam
+ components.</para>
+
<figure>
<title>JSF Content Assist</title>
<mediaobject>
@@ -207,7 +208,7 @@
</imageobject>
</mediaobject>
</figure>
-
+
<figure>
<title>Seam Content Assist</title>
<mediaobject>
@@ -216,9 +217,10 @@
</imageobject>
</mediaobject>
</figure>
-
- <para>Also, as you can see, the ranking and sorting are available in EL code completions.</para>
+ <para>Also, as you can see, the ranking and sorting are available in EL code
+ completions.</para>
+
<section id="JSFProjectFiles3087">
<title>JSF Project Files</title>
@@ -572,7 +574,7 @@
</figure>
</section>
</section>
-
+
<section id="AddingDynamicCodeAssistToCustomComponents8745">
<title>Adding dynamic code assist to custom components that were added to JBoss
@@ -736,7 +738,8 @@
<para>Current VPE version has three tabs: <property>Visual/Source</property>,
<property>Source</property> and <property>Preview</property>. To switch between the
views you can use tabs at the bottom of the VPE or the shortcuts <emphasis>
- <property>Ctrl + PageUp/Ctrl + PageDown</property></emphasis>.</para>
+ <property>Ctrl + PageUp/Ctrl + PageDown</property>
+ </emphasis>.</para>
<figure>
<title>Visual Page Editor</title>
@@ -801,25 +804,25 @@
</imageobject>
</mediaobject>
</figure>
- <para>
-
- You can insert a tag/component from the pallet into either the Source or the Visual part by calling a context menu and selecting <property>Insert around</property>, <property>Insert before</property>, <property>Insert after</property> or <property>Replace With</property>,
- pointing to <property>From Palette</property>, picking the type of the tag and finally choosing the tag you want to insert.
-
- </para>
-
+ <para> You can insert a tag/component from the pallet into either the Source or the
+ Visual part by calling a context menu and selecting <property>Insert
+ around</property>, <property>Insert before</property>, <property>Insert
+ after</property> or <property>Replace With</property>, pointing to
+ <property>From Palette</property>, picking the type of the tag and finally
+ choosing the tag you want to insert. </para>
+
<para>The image below illustrates how you can insert a tag into the Source part.</para>
<figure>
- <title>Inserting a tag into the Source part </title>
+ <title>Inserting a tag into the Source part </title>
<mediaobject>
<imageobject>
<imagedata fileref="images/visual_page/visual_page_23a.png"/>
</imageobject>
</mediaobject>
</figure>
-
+
<para>And this is how a tag is inserted using a context menu in the Visual part.</para>
-
+
<figure>
<title>Inserting a tag into the Visual part</title>
<mediaobject>
@@ -828,8 +831,8 @@
</imageobject>
</mediaobject>
</figure>
-
-
+
+
<para><property>Visual Page Editor</property> provides the option for displaying
non-visual tags in Visual mode of the editor. To enable this option expand the
submenu in the top left corner of the Visual part and select <emphasis>
@@ -888,64 +891,57 @@
</itemizedlist>
</section>
-<section id="codefolding">
- <title>Using Code Folding</title>
- <para>
- <property>Visual Page Editor</property> lets you collapse (hide) and expand (show) sections of your code to make it easier to navigate and read.
-
- </para>
- <para>Code folding can be enabled by
- right-clicking on the left margin on the Source part of Visual
- Page Editor, selecting <property>Folding</property> and checking the <property>Enable Folding</property> checkbox or using the <emphasis><property>Ctrl+Numpad_Divide</property></emphasis> shortcut.</para>
- <para>When the code folding is enabled a minus sing (
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/visual_page/visual_page_23c.png"/>
- </imageobject>
- </inlinemediaobject>
- ) will
- appear on the left margin of the editor next to each opening block tag. </para>
-
- <figure>
- <title>Enabled Code Folding </title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/visual_page/visual_page_24a.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Click the minus sign to collapse a block tag.</para>
-
- <para>When the minus sing is clicked on the appropriate tag collapses and a plus sing (
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/visual_page/visual_page_23d.png"/>
- </imageobject>
- </inlinemediaobject>
- ) is displayed on the left margin as well as
- a gray rectangle two dots
- (
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/visual_page/visual_page_23e.png"/>
- </imageobject>
- </inlinemediaobject>
- )
-
- appears after opening and closing tags. </para>
-
- <figure>
- <title>Collapsed Code</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/visual_page/visual_page_24b.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
-</section>
-
+ <section id="codefolding">
+ <title>Using Code Folding</title>
+ <para>
+ <property>Visual Page Editor</property> lets you collapse (hide) and expand
+ (show) sections of your code to make it easier to navigate and read. </para>
+ <para>Code folding can be enabled by right-clicking on the left margin on the Source
+ part of Visual Page Editor, selecting <property>Folding</property> and checking
+ the <property>Enable Folding</property> checkbox or using the <emphasis>
+ <property>Ctrl+Numpad_Divide</property>
+ </emphasis> shortcut.</para>
+ <para>When the code folding is enabled a minus sing ( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_23c.png"/>
+ </imageobject>
+ </inlinemediaobject> ) will appear on the left margin of the editor next to each
+ opening block tag. </para>
+
+ <figure>
+ <title>Enabled Code Folding </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_24a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click the minus sign to collapse a block tag.</para>
+
+ <para>When the minus sing is clicked on the appropriate tag collapses and a plus
+ sing ( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_23d.png"/>
+ </imageobject>
+ </inlinemediaobject> ) is displayed on the left margin as well as a gray
+ rectangle two dots ( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_23e.png"/>
+ </imageobject>
+ </inlinemediaobject> ) appears after opening and closing tags. </para>
+
+ <figure>
+ <title>Collapsed Code</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_24b.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
<section id="JSPsyntaxvalidation84">
<title>JSP Syntax Validation</title>
@@ -1029,7 +1025,8 @@
<para>The pages you are working with in <property>VPE</property> can use external
stylesheets. <property>VPE</property> allows you to create new style classes in
existing stylesheets and/or edit them as well. For these purposes <property>CSS
- Style Class Dialog</property> is provided (hot keys - CTRL+SHIT+C).</para>
+ Style Class Dialog</property> is provided (hot keys - <emphasis>
+ <property>CTRL+SHIT+C</property>).</emphasis></para>
<para>Select the element for which you need to create or edit style class and press
button next to <emphasis>
<property>styleClass</property>
@@ -1055,7 +1052,7 @@
</mediaobject>
</figure>
<para>First, you should specify the CSS file where you are going to put your style
- class. Do this by pressing button next to the <emphasis>
+ class. Do this by pressing the button next to the <emphasis>
<property>CSS file</property>
</emphasis> field.</para>
<figure>
@@ -1089,23 +1086,57 @@
</mediaobject>
</figure>
- <para><emphasis>
- <property>Quick Edit</property>
- </emphasis> gives a preview of the properties which are set for the existing
+ <para>The <emphasis>
+ <property>Edited properties</property>
+ </emphasis> tab gives a preview of the properties which are set for the existing
style class. You can easily modify them with the help of this wizard.</para>
<figure>
- <title>Quick Edit</title>
+ <title>Edited Properties</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/visual_page/visual_page_21.png"/>
</imageobject>
</mediaobject>
</figure>
+
+ <para>If the style class isn't chosen, the tab doesn't show any properties.</para>
+
+ <figure>
+ <title>Edited Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/edited_properties.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <emphasis>
+ <property>Preview tab</property>
+ </emphasis> is for observing the content of the chosen CSS file. This tab is hidden if no CSS file is chosen.</para>
- <para>Preview at the top of the <property>CSS Style Class Dialog</property>
- visualizes the result.</para>
+ <figure>
+ <title>Preview Tab</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/preview_tab.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>At the top of the <property>CSS Style Class Dialog</property>
+ you can see a preview box which visualizes the result. To edit the preview you should double click in the box. To leave the focus, use <emphasis>
+ <property>Ctrl + Tab</property>.</emphasis></para>
+
+ <figure>
+ <title>Editing the Preview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/preview_box.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
<para>The dialog for creating a new CSS class, which is called from <emphasis>
<property>New > Other... > JBoss Tools Web > CSS Class</property>,
</emphasis> looks the same.</para>
@@ -1232,7 +1263,11 @@
<para><emphasis>
<property>Page Design Options</property>
</emphasis> button leads to the window which helps you to specify necessary
- references to the resources. It is represented by a window with 4 tabs. The first one, <emphasis><property>Actual Run-Time folders</property></emphasis>, is used to replace absolute and relative path values when generating a preview: </para>
+ references to the resources. It is represented by a window with 4 tabs. The
+ first one, <emphasis>
+ <property>Actual Run-Time folders</property>
+ </emphasis>, is used to replace absolute and relative path values when
+ generating a preview: </para>
<figure>
<title>Page Design Options: Actual Run-Time folders</title>
<mediaobject>
@@ -1241,10 +1276,13 @@
</imageobject>
</mediaobject>
</figure>
-
-
- <para>The second tab, <emphasis><property>Included CSS files</property></emphasis>, is used to add CSS files to be linked by Visual Page Editor when generating a preview:</para>
-
+
+
+ <para>The second tab, <emphasis>
+ <property>Included CSS files</property>
+ </emphasis>, is used to add CSS files to be linked by Visual Page Editor
+ when generating a preview:</para>
+
<figure>
<title>Page Design Options: Included CSS files</title>
<mediaobject>
@@ -1253,12 +1291,15 @@
</imageobject>
</mediaobject>
</figure>
-
-
-
-
- <para>The third one, <emphasis><property>Included tag libs</property></emphasis>, can be used to add Taglibs that can be used by the editor for getting appropriate templates to generate a preview:</para>
-
+
+
+
+
+ <para>The third one, <emphasis>
+ <property>Included tag libs</property>
+ </emphasis>, can be used to add Taglibs that can be used by the editor for
+ getting appropriate templates to generate a preview:</para>
+
<figure>
<title>Page Design Options: Included tag libs</title>
<mediaobject>
@@ -1267,9 +1308,12 @@
</imageobject>
</mediaobject>
</figure>
-
- <para>And finally, the <emphasis><property>Substituted El expressions</property></emphasis> tab is used to add El expressions that will be substituted by the editor when generating a preview:</para>
-
+
+ <para>And finally, the <emphasis>
+ <property>Substituted El expressions</property>
+ </emphasis> tab is used to add El expressions that will be substituted by
+ the editor when generating a preview:</para>
+
<figure>
<title>Page Design Options: Substituted El expressions</title>
<mediaobject>
@@ -1278,12 +1322,11 @@
</imageobject>
</mediaobject>
</figure>
-
- <para>The first two tabs of the window let you define actual runtime
- folders. The example below will help you to clarify how this can be
- done.</para>
+ <para>The first two tabs of the window let you define actual runtime folders.
+ The example below will help you to clarify how this can be done.</para>
+
<para>Suppose you have the following project structure:</para>
<programlisting role="XML"><![CDATA[WebContent/
@@ -1317,8 +1360,8 @@
pages'</emphasis> and you will see the image appeared.</para>
<para/>
- <para>Let' consider an example for other tabs. For instance, the definition of your
- CSS on the page is the next:</para>
+ <para>Let' consider an example for other tabs. For instance, the
+ definition of your CSS on the page is the next:</para>
<programlisting role="XML"><![CDATA[<link rel="stylesheet" type="text/css"
href="#{facesContext.externalContext.requestContextPath}/style.css"/>
16 years, 10 months