JBoss Tools SVN: r39029 - in trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools: src/org/jboss/ide/eclipse/archives/webtools/archivetypes and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-23 02:20:01 -0500 (Thu, 23 Feb 2012)
New Revision: 39029
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EarArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EjbArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/J2EEArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/WarArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/ModulePackageTypeConverter.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEARAction.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEJBJARAction.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewWARAction.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PreviewPage.java
Log:
JBIDE-11009 - removed the archive types, which have been deprecated and unused in UI or and completely unsupported in API for several years.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF 2012-02-23 06:58:25 UTC (rev 39028)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF 2012-02-23 07:20:01 UTC (rev 39029)
@@ -33,7 +33,6 @@
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.jboss.ide.eclipse.archives.webtools,
- org.jboss.ide.eclipse.archives.webtools.archivetypes,
org.jboss.ide.eclipse.archives.webtools.filesets,
org.jboss.ide.eclipse.archives.webtools.filesets.vcf,
org.jboss.ide.eclipse.archives.webtools.modules,
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EarArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EarArchiveType.java 2012-02-23 06:58:25 UTC (rev 39028)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EarArchiveType.java 2012-02-23 07:20:01 UTC (rev 39029)
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * 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.ide.eclipse.archives.webtools.archivetypes;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.server.core.IEnterpriseApplication;
-import org.eclipse.jst.server.core.IJ2EEModule;
-import org.eclipse.wst.server.core.IModule;
-import org.jboss.ide.eclipse.archives.core.model.ArchivesModelException;
-import org.jboss.ide.eclipse.archives.core.model.IArchive;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveFolder;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
-import org.jboss.ide.eclipse.archives.webtools.modules.ModulePackageTypeConverter;
-
-/**
- * @author rob.stryker(a)redhat.com
- */
-public class EarArchiveType extends J2EEArchiveType {
- public final static String ID = "org.jboss.ide.eclipse.as.core.packages.earPackageType"; //$NON-NLS-1$
- private static final String EXTENSION = ".ear"; //$NON-NLS-1$
- private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
-
- public String getAssociatedModuleType() {
- return "jst.ear"; //$NON-NLS-1$
- }
-
- public String getId() {
- return ID;
- }
-
- public String getLabel() {
- return "EAR"; //$NON-NLS-1$
- }
-
-
- public IArchive createDefaultConfiguration(String project, IProgressMonitor monitor) {
- IModule mod = getModule(project);
- if( mod != null )
- return createDefaultConfigFromModule(mod, monitor);
- else
- return createDefaultConfiguration2(project, monitor);
- }
-
- public IArchive createDefaultConfiguration2(String projectName,
- IProgressMonitor monitor) {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- IArchive topLevel = createGenericIArchive(project, null, project.getName() + EXTENSION);
- topLevel.setDestinationPath(new Path(project.getName()));
- topLevel.setInWorkspace(true);
-
- fillDefaultConfiguration(projectName, topLevel, monitor);
- return topLevel;
- }
-
- public IArchive createDefaultConfigFromModule(IModule module,
- IProgressMonitor monitor) {
- IProject project = module.getProject();
- IContainer sourceContainer = project.getFolder(EARCONTENT);
- IArchive topLevel = createGenericIArchive(project, null, project.getName() + EXTENSION, sourceContainer);
- topLevel.setDestinationPath(new Path(project.getName()));
- topLevel.setInWorkspace(true);
-
- fillDefaultConfiguration(project.getName(), topLevel, monitor);
- return topLevel;
- }
-
- public IArchive fillDefaultConfiguration(String projectName, IArchive topLevel, IProgressMonitor monitor) {
- try {
- IModule mod = getModule(projectName);
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
-
- if( mod == null ) {
- // add fileset
- IArchiveFolder metainf = addFolder(project, topLevel, METAINF);
- addFileset(project, metainf, new Path(projectName).append(METAINF).toOSString(), null);
-
- } else {
- // now add children
- addFileset(project, topLevel, new Path(project.getName()).append(EARCONTENT).toOSString(), "**/*.*"); //$NON-NLS-1$
- IEnterpriseApplication earModule = (IEnterpriseApplication)mod.loadAdapter(IEnterpriseApplication.class, monitor);
- IModule[] childModules = earModule.getModules();
- for( int i = 0; i < childModules.length; i++ ) {
- IModule child = childModules[i];
- IJ2EEModule j2eeChild = (IJ2EEModule)child.loadAdapter(IJ2EEModule.class, new NullProgressMonitor());
- if( j2eeChild != null && !j2eeChild.isBinary()) {
- IArchiveType type = ModulePackageTypeConverter.getPackageTypeFor(child);
- IArchive childPack;
- if( type == null ) {
- childPack = createGenericIArchive(child.getProject(), null, child.getProject().getName() + JAR_EXTENSION);
- } else {
- if( new Path(childModules[i].getName()).segmentCount() > 1 )
- continue;
- childPack = type.createDefaultConfiguration(child.getProject().getName(), new NullProgressMonitor());
- }
- if( childPack != null )
- topLevel.addChild(childPack);
- }
- }
- }
-
- } catch( ArchivesModelException ame) {}
- return topLevel;
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EjbArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EjbArchiveType.java 2012-02-23 06:58:25 UTC (rev 39028)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EjbArchiveType.java 2012-02-23 07:20:01 UTC (rev 39029)
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * 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.ide.eclipse.archives.webtools.archivetypes;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.wst.server.core.IModule;
-import org.jboss.ide.eclipse.archives.core.model.ArchivesModelException;
-import org.jboss.ide.eclipse.archives.core.model.IArchive;
-
-/**
- *
- * @author rob.stryker(a)redhat.com
- */
-public class EjbArchiveType extends J2EEArchiveType {
-
- public final static String ID = "org.jboss.ide.eclipse.as.core.packages.ejbPackageType"; //$NON-NLS-1$
- public String getAssociatedModuleType() {
- return "jst.ejb"; //$NON-NLS-1$
- }
-
- public String getId() {
- return ID;
- }
-
- public String getLabel() {
- return "EJB JAR"; //$NON-NLS-1$
- }
-
- public IArchive createDefaultConfiguration(String projectName, IProgressMonitor monitor) {
- IProject project = getProject(projectName);
- IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".jar"); //$NON-NLS-1$
- return fillDefaultConfiguration(project, topLevel, monitor);
- }
-
- public IArchive fillDefaultConfiguration(String projectName, IArchive topLevel, IProgressMonitor monitor) {
- return fillDefaultConfiguration(getProject(projectName), topLevel, monitor);
- }
- public IArchive fillDefaultConfiguration(IProject project, IArchive topLevel, IProgressMonitor monitor) {
-
- IModule mod = getModule(project.getName());
-
- if( mod == null ) {
- // TODO fix me
- } else {
- if( mod.getModuleType().getId().equals("jst.ejb") ) { //$NON-NLS-1$
- try {
- IJavaProject proj = JavaCore.create(project);
- IPath outputLoc = proj.getOutputLocation();
- addFileset(project, topLevel, outputLoc.toOSString(), null);
- } catch( JavaModelException jmde) {
- } catch( ArchivesModelException ame ) {}
- }
- }
- return topLevel;
- }
-
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/J2EEArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/J2EEArchiveType.java 2012-02-23 06:58:25 UTC (rev 39028)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/J2EEArchiveType.java 2012-02-23 07:20:01 UTC (rev 39029)
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * 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.ide.eclipse.archives.webtools.archivetypes;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.internal.ServerPlugin;
-import org.jboss.ide.eclipse.archives.core.ArchivesCore;
-import org.jboss.ide.eclipse.archives.core.model.ArchivesModelException;
-import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory;
-import org.jboss.ide.eclipse.archives.core.model.IArchive;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveStandardFileSet;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveFolder;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
-import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory.DirectoryScannerExtension;
-import org.jboss.ide.eclipse.archives.webtools.IntegrationPlugin;
-import org.jboss.ide.eclipse.archives.webtools.Messages;
-
-/**
- *
- * @author rob.stryker(a)jboss.com
- */
-public abstract class J2EEArchiveType implements IArchiveType {
- public static final String METAINF = "META-INF"; //$NON-NLS-1$
- public static final String WEBINF = "WEB-INF";//$NON-NLS-1$
- public static final String CLASSES = "classes";//$NON-NLS-1$
- public static final String LIB = "lib";//$NON-NLS-1$
- public static final String WEBCONTENT = "WebContent";//$NON-NLS-1$
- public static final String EARCONTENT = "EarContent";//$NON-NLS-1$
- public static final String EJBMODULE = "ejbModule";//$NON-NLS-1$
-
-
- protected boolean isModuleType(IModule module, String moduleTypeId){
- if(module.getModuleType()!=null && moduleTypeId.equals(module.getModuleType().getId()))
- return true;
- return false;
- }
-
- protected IModule getModule(String projectName) {
- IModuleArtifact moduleArtifacts[] = ServerPlugin.getModuleArtifacts(getProject(projectName));
-
- if (moduleArtifacts != null && moduleArtifacts.length > 0)
- return moduleArtifacts[0].getModule();
- else return null;
- }
-
- protected IProject getProject(String projectName) {
- return ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- }
- // Find the source folder, then create the IPackage appropriately
- public static IArchive createGenericIArchive(IProject project, String deployDirectory, String packageName) {
- try {
- IJavaProject javaProject = JavaCore.create(project);
- Assert.isNotNull(javaProject);
-
- IPath sourcePath;
- try {
- sourcePath = javaProject.getOutputLocation();
- } catch (JavaModelException e) {
- return null;
- }
- sourcePath = sourcePath.removeFirstSegments(1);
- IContainer sourcePathContainer;
- if( sourcePath.segmentCount() == 0 )
- sourcePathContainer = project;
- else
- sourcePathContainer = project.getFolder(sourcePath);
- return createGenericIArchive(project, deployDirectory, packageName, sourcePathContainer);
- } catch( Exception e ) {
- IntegrationPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, IntegrationPlugin.PLUGIN_ID, Messages.ExceptionUnexpectedException, e));
- }
- return null;
- }
-
- // Create a detached package with some generic settings
- public static IArchive createGenericIArchive(IProject project, String deployDirectory, String packageName, IContainer sourceContainer) {
- IArchive jar = ArchivesCore.getInstance().getNodeFactory().createArchive();
-
- if( deployDirectory != null ) {
- jar.setDestinationPath(new Path(deployDirectory));
- jar.setInWorkspace(ResourcesPlugin.getWorkspace().getRoot().getLocation().isPrefixOf(new Path(deployDirectory)));
- jar.setExploded(false);
- } else {
- jar.setDestinationPath(project.getFullPath());
- jar.setInWorkspace(true);
- jar.setExploded(false);
- }
- jar.setName(packageName);
- return jar;
- }
-
-
- public static IArchiveFolder addFolder(IProject project,
- IArchiveNode parent, String name) throws ArchivesModelException {
- IArchiveFolder folder = ArchivesCore.getInstance().getNodeFactory().createFolder();
- folder.setName(name);
- parent.addChild(folder);
- return folder;
- }
- public static IArchiveStandardFileSet addFileset(IProject project, IArchiveNode parent,
- String sourcePath, String includePattern) throws ArchivesModelException {
- IArchiveStandardFileSet fs = ArchivesCore.getInstance().getNodeFactory().createFileset();
- Assert.isNotNull(project);
- IJavaProject javaProject = JavaCore.create(project);
- Assert.isNotNull(javaProject);
-
- IContainer sourceContainer;
- if( sourcePath != null && !sourcePath.equals("")) { //$NON-NLS-1$
- Path p = new Path(sourcePath);
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- sourceContainer = p.segmentCount() != 1 ? (IContainer)root.getFolder(p) : root.getProject(p.segment(0));
- } else {
- sourceContainer = project;
- }
-
- fs.setRawSourcePath(sourceContainer.getFullPath().toString());
- fs.setInWorkspace(true);
- fs.setIncludesPattern( includePattern == null ? "**/*" : includePattern ); //$NON-NLS-1$
- parent.addChild(fs);
- return fs;
- }
-
- public abstract String getAssociatedModuleType();
-
- /*
- * Creates a directory scanner for some global path
- */
- public static DirectoryScannerExtension createDirectoryScanner (String rawPath, String includes, String excludes, boolean scan) {
- return DirectoryScannerFactory.createDirectoryScanner(rawPath, null, includes, excludes, null, false, 1, scan);
- }
-
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/WarArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/WarArchiveType.java 2012-02-23 06:58:25 UTC (rev 39028)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/WarArchiveType.java 2012-02-23 07:20:01 UTC (rev 39029)
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * 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.ide.eclipse.archives.webtools.archivetypes;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-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.Status;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.server.core.IJ2EEModule;
-import org.eclipse.jst.server.core.IWebModule;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.server.core.IModule;
-import org.jboss.ide.eclipse.archives.core.ArchivesCorePlugin;
-import org.jboss.ide.eclipse.archives.core.asf.DirectoryScanner;
-import org.jboss.ide.eclipse.archives.core.model.ArchivesModelException;
-import org.jboss.ide.eclipse.archives.core.model.IArchive;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveStandardFileSet;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveFolder;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
-import org.jboss.ide.eclipse.archives.webtools.IntegrationPlugin;
-import org.jboss.ide.eclipse.archives.webtools.Messages;
-
-/**
- *
- * @author rob.stryker(a)jboss.com
- */
-public class WarArchiveType extends J2EEArchiveType {
- public static final String WAR_PACKAGE_TYPE = "org.jboss.ide.eclipse.as.core.packages.warPackage"; //$NON-NLS-1$
-
- public String getAssociatedModuleType() {
- return "jst.web"; //$NON-NLS-1$
- }
-
- public IArchive createDefaultConfiguration(String projectName, IProgressMonitor monitor) {
- IModule mod = getModule(projectName);
- if( mod == null )
- return createDefaultConfiguration2(projectName, monitor);
- else
- return createDefaultConfigFromModule(mod, monitor);
- }
-
- protected IArchive createDefaultConfiguration2(String projectName, IProgressMonitor monitor) {
- IProject project = getProject(projectName);
- IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".war"); //$NON-NLS-1$
- return fillDefaultConfiguration(project, topLevel, monitor);
- }
-
- public IArchive fillDefaultConfiguration(String projectName, IArchive topLevel, IProgressMonitor monitor) {
- return fillDefaultConfiguration(getProject(projectName), topLevel, monitor);
- }
- public IArchive fillDefaultConfiguration(IProject project, IArchive topLevel, IProgressMonitor monitor) {
- try {
- IModule mod = getModule(project.getName());
- IArchiveFolder webinf = addFolder(project, topLevel, WEBINF);
- IArchiveFolder lib = addFolder(project, webinf, LIB);
- IArchiveFolder classes = addFolder(project, webinf, CLASSES);
- addReferencedProjectsAsLibs(project, lib);
- addLibFileset(project, lib, true);
- addClassesFileset(project, classes);
-
- if( mod == null ) {
- addWebinfFileset(project, webinf);
- } else {
- addWebContentFileset(project, topLevel);
- }
- } catch( ArchivesModelException ame) {}
- return topLevel;
- }
-
- // For modules only
- protected void addWebContentFileset(IProject project, IArchiveNode packageRoot) throws ArchivesModelException {
- try {
- IPath projectPath = project.getLocation();
- DirectoryScanner scanner = createDirectoryScanner(projectPath.toString(), "**/WEB-INF/web.xml", null, true); //$NON-NLS-1$
- String[] files = scanner.getIncludedFiles();
- // just take the first
- if( files.length > 0 ) {
- IPath path = new Path(files[0]);
- path = path.removeLastSegments(2); // remove the file name
- path = new Path(project.getName()).append(path); // pre-pend project name to make workspace-relative
- IArchiveStandardFileSet fs = addFileset(project, packageRoot, path.toOSString(), "**/*"); //$NON-NLS-1$
- //If we have separate file set for libraries, we do not need to duplicate jars.
- fs.setExcludesPattern("**/WEB-INF/lib/*.jar"); //$NON-NLS-1$
- }
- } catch( IllegalStateException ise ) {
- IStatus status = new Status(IStatus.WARNING, IntegrationPlugin.PLUGIN_ID, Messages.ExceptionCannotScanDirectory, ise);
- IntegrationPlugin.getDefault().getLog().log(status);
- }
- }
-
- protected void addClassesFileset(IProject project, IArchiveFolder folder) throws ArchivesModelException {
- IJavaProject jp = JavaCore.create(project);
- if( jp != null ) {
- try {
- IPath outputLoc = project.getWorkspace().getRoot().getLocation();
- outputLoc = outputLoc.append(jp.getOutputLocation());
- addFileset(project, folder, jp.getOutputLocation().toOSString(), "**/*"); //$NON-NLS-1$
- } catch( JavaModelException jme ) {
- // no logging
- }
- }
- }
- protected void addWebinfFileset(IProject project, IArchiveFolder folder) throws ArchivesModelException {
- try {
- IPath projectPath = project.getLocation();
- DirectoryScanner scanner = createDirectoryScanner(projectPath.toString(), "**/web.xml", null, true); //$NON-NLS-1$
- String[] files = scanner.getIncludedFiles();
- // just take the first
- if( files.length > 0 ) {
- IPath path = new Path(files[0]);
- path = path.removeLastSegments(1); // remove the file name
- path = new Path(project.getName()).append(path); // pre-pend project name to make workspace-relative
- addFileset(project, folder, path.toOSString(), "**/*"); //$NON-NLS-1$
- }
- } catch( IllegalStateException ise ) {
- IStatus status = new Status(IStatus.WARNING, ArchivesCorePlugin.PLUGIN_ID, Messages.ExceptionCannotScanDirectory, ise);
- ArchivesCorePlugin.getDefault().getLog().log(status);
- }
- }
-
- // Lib support
- protected void addLibFileset(IProject project, IArchiveFolder folder, boolean includeTopLevelJars) throws ArchivesModelException {
- // Let us find /WEB-INF/lib directory and set it as source for the file set.
- String sourcePath = null;
-
- IPath projectPath = project.getLocation();
- DirectoryScanner scanner = createDirectoryScanner(projectPath.toString(), "**/WEB-INF/web.xml", null, true); //$NON-NLS-1$
- String[] files = scanner.getIncludedFiles();
-
- if(files != null && files.length > 0) {
- IPath path = new Path(files[0]);
- path = path.removeLastSegments(1).append("lib"); //$NON-NLS-1$
- sourcePath = project.getFullPath().append(path).toString();
- addFileset(project, folder, sourcePath, "*.jar"); // add default jars //$NON-NLS-1$
- } else {
- //having failed to find 'lib' directory, let us make source of the project itself
- sourcePath = project.getName();
- DirectoryScanner scanner2 = createDirectoryScanner(projectPath.toString(), "**/*.jar", null, true); //$NON-NLS-1$
- String[] files2 = scanner2.getIncludedFiles();
- IPath p;
- ArrayList list = new ArrayList();
- for( int i = 0; i < files2.length; i++ ) {
- p = project.getFullPath().append(files2[i]).removeLastSegments(1);
- if( !list.contains(p)) {
- list.add(p);
- addFileset(project, folder, p.toString(), "*.jar"); // add default jars //$NON-NLS-1$
- }
- }
- }
- }
- protected void addReferencedProjectsAsLibs(IProject project, IArchiveFolder folder) throws ArchivesModelException {
- IJavaProject jp = JavaCore.create(project);
- if( jp != null && jp.exists()) {
- try {
- IClasspathEntry[] entries = jp.getRawClasspath();
- for( int i = 0; i < entries.length; i++ ) {
- if( entries[i].getEntryKind() == IClasspathEntry.CPE_PROJECT) {
- IPath path = entries[i].getPath();
- IResource res = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
- if( res instanceof IProject ) {
- createLibFromProject((IProject)res, folder);
- }
- }
- }
- } catch( JavaModelException jme ) {
- // no logging
- }
- }
- }
-
-
- protected void createLibFromProject(IProject project, IArchiveFolder folder) throws ArchivesModelException {
- IArchive pack = createGenericIArchive(project, null, project.getName() + ".jar");//$NON-NLS-1$
- folder.addChild(pack);
- }
-
- protected IArchive createDefaultConfigFromModule(IModule mod, IProgressMonitor monitor) {
- try {
- IProject project = mod.getProject();
-
- // create the stub
- IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".war");//$NON-NLS-1$
- topLevel.setDestinationPath(new Path(project.getName()));
- topLevel.setInWorkspace(true);
-
- // add lib folder so we can add libraries
- IArchiveFolder webinf = addFolder(project, topLevel, WEBINF);
- IArchiveFolder lib = addFolder(project, webinf, LIB);
- IArchiveFolder classes = addFolder(project, webinf, CLASSES);
-
-
- IVirtualComponent vc = ComponentCore.createComponent(project);
- IPath webContentPath = vc.getRootFolder().getUnderlyingFolder().getFullPath();
- addFileset(project, topLevel, webContentPath.toOSString(), "**/*");//$NON-NLS-1$
- addClassesFileset(project, classes);
-
- // package each child and add to lib folder
- IWebModule webModule = (IWebModule)mod.loadAdapter(IWebModule.class, monitor);
- IModule[] childModules = webModule.getModules();
- for (int i = 0; i < childModules.length; i++) {
- IModule child = childModules[i];
- IJ2EEModule j2eeChild = (IJ2EEModule)child.loadAdapter(IJ2EEModule.class, new NullProgressMonitor());
- if( j2eeChild != null && !j2eeChild.isBinary()) {
- lib.addChild(createGenericIArchive(child.getProject(), null, child.getProject().getName() + ".jar"));//$NON-NLS-1$
- }
- }
- return topLevel;
- } catch( Exception e ) {
- IntegrationPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, IntegrationPlugin.PLUGIN_ID, Messages.ExceptionUnexpectedException, e));
- }
- return null;
- }
-
- public String getId() {
- return WAR_PACKAGE_TYPE;
- }
-
- public String getLabel() {
- return "WAR";//$NON-NLS-1$
- }
-}
\ No newline at end of file
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/ModulePackageTypeConverter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/ModulePackageTypeConverter.java 2012-02-23 06:58:25 UTC (rev 39028)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/ModulePackageTypeConverter.java 2012-02-23 07:20:01 UTC (rev 39029)
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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.ide.eclipse.archives.webtools.modules;
-
-import org.eclipse.wst.server.core.IModule;
-import org.jboss.ide.eclipse.archives.core.ArchivesCore;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
-import org.jboss.ide.eclipse.archives.webtools.archivetypes.EarArchiveType;
-import org.jboss.ide.eclipse.archives.webtools.archivetypes.EjbArchiveType;
-import org.jboss.ide.eclipse.archives.webtools.archivetypes.WarArchiveType;
-
-/**
- *
- * @author rob.stryker(a)jboss.com
- */
-public class ModulePackageTypeConverter {
- public static IArchiveType getPackageTypeFor(IModule module) {
- String modType = module.getModuleType().getId();
- if("jst.web".equals(modType)) {//$NON-NLS-1$
- return ArchivesCore.getInstance().getExtensionManager().getArchiveType(WarArchiveType.WAR_PACKAGE_TYPE);
- } else if("jst.ear".equals(modType)) {//$NON-NLS-1$
- return ArchivesCore.getInstance().getExtensionManager().getArchiveType(EarArchiveType.ID);
- } else if("jst.ejb".equals(modType)) {//$NON-NLS-1$
- return ArchivesCore.getInstance().getExtensionManager().getArchiveType(EjbArchiveType.ID);
- }
-
- return null;
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEARAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEARAction.java 2012-02-23 06:58:25 UTC (rev 39028)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEARAction.java 2012-02-23 07:20:01 UTC (rev 39029)
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * 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.ide.eclipse.archives.webtools.ui;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-import org.jboss.ide.eclipse.archives.core.ArchivesCore;
-import org.jboss.ide.eclipse.archives.core.model.IArchive;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
-import org.jboss.ide.eclipse.archives.ui.ArchivesSharedImages;
-import org.jboss.ide.eclipse.archives.ui.wizards.AbstractArchiveWizard;
-import org.jboss.ide.eclipse.archives.webtools.Messages;
-import org.jboss.ide.eclipse.archives.webtools.archivetypes.EarArchiveType;
-import org.jboss.ide.eclipse.archives.webtools.archivetypes.WarArchiveType;
-
-public class NewEARAction implements IActionDelegate {
-
- private IStructuredSelection selection;
- public void run() {
- AbstractArchiveWizard wizard = new NewEARWizard();
- wizard.init(PlatformUI.getWorkbench(), selection);
- WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
- dialog.open();
- }
-
-
- public void run(IAction action) {
- run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- if( selection instanceof IStructuredSelection)
- this.selection = (IStructuredSelection)selection;
- }
-
- public void init(IViewPart view) {
- }
-
- public static class NewEARWizard extends AbstractArchiveWizard {
-
- private EARPreviewPage earInfoPage;
-
- public NewEARWizard () {
- setWindowTitle(Messages.NewEar);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_EAR);
- }
-
- public WizardPage[] createWizardPages() {
- earInfoPage = new EARPreviewPage(this);
-
- return new WizardPage[] { earInfoPage };
- }
-
- public boolean performFinish(IArchive pkg) {
- pkg.setArchiveType(ArchivesCore.getInstance().getExtensionManager().getArchiveType(EarArchiveType.ID));
- return true;
- }
-
- public String getArchiveExtension() {
- return "ear"; //$NON-NLS-1$
- }
- }
-
-
- protected static class EARPreviewPage extends PreviewPage {
- protected EARPreviewPage(NewEARWizard wiz) {
- super(wiz, Messages.EarPreview, Messages.EarPreview,
- ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_EAR));
- }
- protected String getArchiveTypeId() {
- return EarArchiveType.ID;
- }
- protected String getDescriptionMessage() {
- return Messages.EarDescription;
- }
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEJBJARAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEJBJARAction.java 2012-02-23 06:58:25 UTC (rev 39028)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEJBJARAction.java 2012-02-23 07:20:01 UTC (rev 39029)
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * 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.ide.eclipse.archives.webtools.ui;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.jboss.ide.eclipse.archives.core.ArchivesCore;
-import org.jboss.ide.eclipse.archives.core.model.IArchive;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
-import org.jboss.ide.eclipse.archives.ui.ArchivesSharedImages;
-import org.jboss.ide.eclipse.archives.ui.wizards.AbstractArchiveWizard;
-import org.jboss.ide.eclipse.archives.webtools.Messages;
-import org.jboss.ide.eclipse.archives.webtools.archivetypes.EarArchiveType;
-import org.jboss.ide.eclipse.archives.webtools.archivetypes.EjbArchiveType;
-
-public class NewEJBJARAction implements IActionDelegate {
- private IStructuredSelection selection;
- public void run() {
- AbstractArchiveWizard wizard = new NewEJBWizard();
- wizard.init(PlatformUI.getWorkbench(), selection);
- WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
- dialog.open();
- }
-
- public void run(IAction action) {
- run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- if( selection instanceof IStructuredSelection)
- this.selection = (IStructuredSelection)selection;
- }
-
- public static class NewEJBWizard extends AbstractArchiveWizard {
-
- private EjbJarPreviewPage ejbInfoPage;
-
- public NewEJBWizard () {
- setWindowTitle(Messages.NewEjbJar);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_EJB_JAR);
- }
-
- public WizardPage[] createWizardPages() {
- ejbInfoPage = new EjbJarPreviewPage(this);
-
- return new WizardPage[] { ejbInfoPage };
- }
-
- public boolean performFinish(IArchive pkg) {
- pkg.setArchiveType(ArchivesCore.getInstance().getExtensionManager().getArchiveType(EjbArchiveType.ID));
- return true;
- }
-
- public String getArchiveExtension() {
- return "jar"; //$NON-NLS-1$
- }
- }
-
-
- protected static class EjbJarPreviewPage extends PreviewPage {
- protected EjbJarPreviewPage(NewEJBWizard wiz) {
- super(wiz, Messages.EjbJarPreview, Messages.EjbJarPreview,
- ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_NEW_JAR_WIZARD));
- }
- protected String getArchiveTypeId() {
- return EjbArchiveType.ID;
- }
- protected String getDescriptionMessage() {
- return Messages.EjbJarDescription;
- }
- }
-
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewWARAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewWARAction.java 2012-02-23 06:58:25 UTC (rev 39028)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewWARAction.java 2012-02-23 07:20:01 UTC (rev 39029)
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * 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.ide.eclipse.archives.webtools.ui;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.jboss.ide.eclipse.archives.core.ArchivesCore;
-import org.jboss.ide.eclipse.archives.core.model.IArchive;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
-import org.jboss.ide.eclipse.archives.ui.ArchivesSharedImages;
-import org.jboss.ide.eclipse.archives.ui.wizards.AbstractArchiveWizard;
-import org.jboss.ide.eclipse.archives.webtools.Messages;
-import org.jboss.ide.eclipse.archives.webtools.archivetypes.WarArchiveType;
-
-public class NewWARAction implements IActionDelegate {
- private IStructuredSelection selection;
- public void run() {
- NewWARWizard wizard = new NewWARWizard();
- wizard.init(PlatformUI.getWorkbench(), selection);
- WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
- dialog.open();
- }
-
- public void run(IAction action) {
- run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- if( selection instanceof IStructuredSelection)
- this.selection = (IStructuredSelection)selection;
- }
-
-
- public static class NewWARWizard extends AbstractArchiveWizard {
-
- private WarPreviewPage warInfoPage;
-
- public NewWARWizard () {
- setWindowTitle(Messages.NewWar);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- public WizardPage[] createWizardPages() {
- warInfoPage = new WarPreviewPage(this);
-
- return new WizardPage[] { warInfoPage };
- }
-
- public boolean performFinish(IArchive pkg) {
- pkg.setArchiveType(ArchivesCore.getInstance().getExtensionManager().getArchiveType(WarArchiveType.WAR_PACKAGE_TYPE));
- return true;
- }
-
- public String getArchiveExtension() {
- return "war"; //$NON-NLS-1$
- }
- }
-
- protected static class WarPreviewPage extends PreviewPage {
- protected WarPreviewPage(NewWARWizard wiz) {
- super(wiz, Messages.WarPreview, Messages.WarPreview,
- ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_NEW_WAR_WIZARD));
- }
-
- protected String getArchiveTypeId() {
- return WarArchiveType.WAR_PACKAGE_TYPE;
- }
-
- protected String getDescriptionMessage() {
- return Messages.WarDescription;
- }
- }
-}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PreviewPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PreviewPage.java 2012-02-23 06:58:25 UTC (rev 39028)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PreviewPage.java 2012-02-23 07:20:01 UTC (rev 39029)
@@ -51,7 +51,6 @@
import org.jboss.ide.eclipse.archives.ui.wizards.AbstractArchiveWizard;
import org.jboss.ide.eclipse.archives.ui.wizards.WizardPageWithNotification;
import org.jboss.ide.eclipse.archives.webtools.Messages;
-import org.jboss.ide.eclipse.archives.webtools.archivetypes.WarArchiveType;
public abstract class PreviewPage extends WizardPageWithNotification {
12 years, 7 months
JBoss Tools SVN: r39028 - branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-23 01:58:25 -0500 (Thu, 23 Feb 2012)
New Revision: 39028
Modified:
branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
Log:
JBIDE-10959 - to branch
Modified: branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2012-02-23 06:57:34 UTC (rev 39027)
+++ branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2012-02-23 06:58:25 UTC (rev 39028)
@@ -66,6 +66,7 @@
org.jboss.ide.eclipse.as.ui.launch,
org.jboss.ide.eclipse.as.ui.preferences,
org.jboss.ide.eclipse.as.ui.views,
+ org.jboss.ide.eclipse.as.ui.views.as7.management.content,
org.jboss.ide.eclipse.as.ui.views.server.extensions,
org.jboss.ide.eclipse.as.ui.wizards,
org.jboss.tools.as.wst.server.ui.xpl
12 years, 7 months
JBoss Tools SVN: r39027 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-23 01:57:34 -0500 (Thu, 23 Feb 2012)
New Revision: 39027
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
Log:
JBIDE-10959 to trunk
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 2012-02-23 00:56:33 UTC (rev 39026)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2012-02-23 06:57:34 UTC (rev 39027)
@@ -66,6 +66,7 @@
org.jboss.ide.eclipse.as.ui.launch,
org.jboss.ide.eclipse.as.ui.preferences,
org.jboss.ide.eclipse.as.ui.views,
+ org.jboss.ide.eclipse.as.ui.views.as7.management.content,
org.jboss.ide.eclipse.as.ui.views.server.extensions,
org.jboss.ide.eclipse.as.ui.wizards,
org.jboss.tools.as.wst.server.ui.xpl
12 years, 7 months
JBoss Tools SVN: r39026 - in branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui: src/org/jboss/tools/jst/web/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-02-22 19:56:33 -0500 (Wed, 22 Feb 2012)
New Revision: 39026
Modified:
branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties
branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java
Log:
JBIDE-10787
https://issues.jboss.org/browse/JBIDE-10787
Merge to Beta1: Minor fixes.
Modified: branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
===================================================================
--- branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2012-02-23 00:51:36 UTC (rev 39025)
+++ branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2012-02-23 00:56:33 UTC (rev 39026)
@@ -192,7 +192,7 @@
</selection>
</wizard>
<wizard
- name="JBoss Datasource"
+ name="JBoss Datasource (-ds.xml)"
icon="$nl$/images/xstudio/wizards/new_properties_file.gif"
category="org.jboss.tools.jst.web"
class="org.jboss.tools.jst.web.ui.wizards.newfile.NewDSXMLWizard"
Modified: branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties
===================================================================
--- branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties 2012-02-23 00:51:36 UTC (rev 39025)
+++ branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties 2012-02-23 00:56:33 UTC (rev 39026)
@@ -79,10 +79,10 @@
UI_WIZARD_XHTML_NEW_Description=Create New XHTML Page
NewDSXMLWizard_TITLE=New JBoss Datasource
-NewDSXMLWizard_SUBTITLE=JBoss Datasource
-NewDSXMLWizard_DESCRIPTION=Create New JBoss Datasource
+NewDSXMLWizard_SUBTITLE=JBoss Datasource (-ds.xml)
+NewDSXMLWizard_DESCRIPTION=Create a new JBoss datasource
NewDSXMLWizard_CONNECTION_PROFILE_FIELD=Connection profile:
-NewDSXMLWizard_TEMPLATE_FIELD=Template:
+NewDSXMLWizard_TEMPLATE_FIELD=Format:
NewDSXMLWizard_EDIT_BUTTON=Edit...
NewDSXMLWizard_NEW_BUTTON=New...
NewDSXMLWizard_FILE_EXISTS=''{0}'' already exists.
Modified: branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java 2012-02-23 00:51:36 UTC (rev 39025)
+++ branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java 2012-02-23 00:56:33 UTC (rev 39026)
@@ -711,18 +711,19 @@
class NewDSXMLWizardFactory {
static String EMPTY_PROFILE = " "; //$NON-NLS-1$
- static String AS_5_TEMPLATE = "Format: JBoss AS 5"; //$NON-NLS-1$
- static String AS_7_TEMPLATE = "Format: JBoss AS 7"; //$NON-NLS-1$
+ static String AS_5_TEMPLATE = "AS 5"; //$NON-NLS-1$
+ static String AS_7_TEMPLATE = "AS 7"; //$NON-NLS-1$
public static String[] TEMPLATE_LIST = {
AS_5_TEMPLATE, AS_7_TEMPLATE
};
public static IFieldEditor createTemplateFieldEditor(Object defaultValue) {
- IFieldEditor result = IFieldEditorFactory.INSTANCE.createComboEditor(
+ IFieldEditor result = IFieldEditorFactory.INSTANCE.createRadioEditor(
IDSDataModelProperties.TEMPLATE,
Messages.NewDSXMLWizard_TEMPLATE_FIELD,
Arrays.asList(TEMPLATE_LIST),
+ Arrays.asList(TEMPLATE_LIST),
TEMPLATE_LIST[0]);
return result;
}
12 years, 7 months
JBoss Tools SVN: r39025 - in trunk/jst/plugins/org.jboss.tools.jst.web.ui: src/org/jboss/tools/jst/web/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-02-22 19:51:36 -0500 (Wed, 22 Feb 2012)
New Revision: 39025
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java
Log:
JBIDE-10787
https://issues.jboss.org/browse/JBIDE-10787
Minor fixes.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2012-02-23 00:14:00 UTC (rev 39024)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2012-02-23 00:51:36 UTC (rev 39025)
@@ -192,7 +192,7 @@
</selection>
</wizard>
<wizard
- name="JBoss Datasource"
+ name="JBoss Datasource (-ds.xml)"
icon="$nl$/images/xstudio/wizards/new_properties_file.gif"
category="org.jboss.tools.jst.web"
class="org.jboss.tools.jst.web.ui.wizards.newfile.NewDSXMLWizard"
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties 2012-02-23 00:14:00 UTC (rev 39024)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties 2012-02-23 00:51:36 UTC (rev 39025)
@@ -79,10 +79,10 @@
UI_WIZARD_XHTML_NEW_Description=Create New XHTML Page
NewDSXMLWizard_TITLE=New JBoss Datasource
-NewDSXMLWizard_SUBTITLE=JBoss Datasource
-NewDSXMLWizard_DESCRIPTION=Create New JBoss Datasource
+NewDSXMLWizard_SUBTITLE=JBoss Datasource (-ds.xml)
+NewDSXMLWizard_DESCRIPTION=Create a new JBoss datasource
NewDSXMLWizard_CONNECTION_PROFILE_FIELD=Connection profile:
-NewDSXMLWizard_TEMPLATE_FIELD=Template:
+NewDSXMLWizard_TEMPLATE_FIELD=Format:
NewDSXMLWizard_EDIT_BUTTON=Edit...
NewDSXMLWizard_NEW_BUTTON=New...
NewDSXMLWizard_FILE_EXISTS=''{0}'' already exists.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java 2012-02-23 00:14:00 UTC (rev 39024)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java 2012-02-23 00:51:36 UTC (rev 39025)
@@ -711,18 +711,19 @@
class NewDSXMLWizardFactory {
static String EMPTY_PROFILE = " "; //$NON-NLS-1$
- static String AS_5_TEMPLATE = "Format: JBoss AS 5"; //$NON-NLS-1$
- static String AS_7_TEMPLATE = "Format: JBoss AS 7"; //$NON-NLS-1$
+ static String AS_5_TEMPLATE = "AS 5"; //$NON-NLS-1$
+ static String AS_7_TEMPLATE = "AS 7"; //$NON-NLS-1$
public static String[] TEMPLATE_LIST = {
AS_5_TEMPLATE, AS_7_TEMPLATE
};
public static IFieldEditor createTemplateFieldEditor(Object defaultValue) {
- IFieldEditor result = IFieldEditorFactory.INSTANCE.createComboEditor(
+ IFieldEditor result = IFieldEditorFactory.INSTANCE.createRadioEditor(
IDSDataModelProperties.TEMPLATE,
Messages.NewDSXMLWizard_TEMPLATE_FIELD,
Arrays.asList(TEMPLATE_LIST),
+ Arrays.asList(TEMPLATE_LIST),
TEMPLATE_LIST[0]);
return result;
}
12 years, 7 months
JBoss Tools SVN: r39024 - in trunk/seam/plugins: org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-02-22 19:14:00 -0500 (Wed, 22 Feb 2012)
New Revision: 39024
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ASTVisitorImpl.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/TypeScanner.java
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/builder/ToggleSeamNatureAction.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchResultPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchVisitor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/JavaStringHyperlinkDetector.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/scanner/JavaAnnotationScanner.java
Log:
Code cleanup
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java 2012-02-23 00:09:28 UTC (rev 39023)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java 2012-02-23 00:14:00 UTC (rev 39024)
@@ -19,6 +19,7 @@
import org.jboss.tools.seam.core.ISeamElement;
import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
import org.jboss.tools.seam.core.ScopeType;
+import org.jboss.tools.seam.core.SeamCorePlugin;
import org.w3c.dom.Element;
/**
@@ -49,7 +50,7 @@
try {
this.scopeType = scope == null || scope.length() == 0 ? ScopeType.UNSPECIFIED : ScopeType.valueOf(scope.toUpperCase());
} catch (IllegalArgumentException e) {
- //ignore
+ SeamCorePlugin.getDefault().logError(e);
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java 2012-02-23 00:09:28 UTC (rev 39023)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java 2012-02-23 00:14:00 UTC (rev 39024)
@@ -310,12 +310,12 @@
try {
new FormatProcessorXML().formatFile((IFile) jbossAppXml);
} catch (IOException e) {
-
+ SeamCorePlugin.getDefault().logError(e);
} catch (CoreException e) {
-
+ SeamCorePlugin.getDefault().logError(e);
}
}
-
+
private void setValue(Document document, Node node, String value) {
Text text = document.createTextNode(value);
node.appendChild(text);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ASTVisitorImpl.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ASTVisitorImpl.java 2012-02-23 00:09:28 UTC (rev 39023)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ASTVisitorImpl.java 2012-02-23 00:14:00 UTC (rev 39024)
@@ -34,6 +34,7 @@
import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
import org.eclipse.jdt.core.dom.TypeDeclaration;
import org.jboss.tools.common.model.util.EclipseJavaUtil;
+import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.internal.core.scanner.Util;
/**
@@ -174,7 +175,7 @@
try {
ts = current.type.getTypes();
} catch (JavaModelException e) {
- //ignore
+ SeamCorePlugin.getDefault().logError(e);
}
IType t = null;
if(ts != null) for (int i = 0; t == null && i < ts.length; i++) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2012-02-23 00:09:28 UTC (rev 39023)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2012-02-23 00:14:00 UTC (rev 39024)
@@ -38,6 +38,7 @@
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
import org.jboss.tools.seam.core.SeamComponentMethodType;
+import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.internal.core.BijectedAttribute;
import org.jboss.tools.seam.internal.core.DataModelSelectionAttribute;
import org.jboss.tools.seam.internal.core.Role;
@@ -366,7 +367,7 @@
try {
ms = type.getMethods();
} catch (JavaModelException e) {
- //ignore
+ SeamCorePlugin.getDefault().logError(e);
}
String name = m.getName().getIdentifier();
if(ms != null) for (int i = 0; i < ms.length; i++) {
@@ -396,7 +397,7 @@
try {
fs = type.getFields();
} catch (JavaModelException e1) {
- // ignore
+ SeamCorePlugin.getDefault().logError(e1);
}
String name = getFieldName(f);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java 2012-02-23 00:09:28 UTC (rev 39023)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java 2012-02-23 00:14:00 UTC (rev 39024)
@@ -188,7 +188,7 @@
public void run() {
if(update()) {
- System.out.println("Running " + getId());
+// System.out.println("Running " + getId());
process();
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/TypeScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/TypeScanner.java 2012-02-23 00:09:28 UTC (rev 39023)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/TypeScanner.java 2012-02-23 00:14:00 UTC (rev 39024)
@@ -178,15 +178,15 @@
process(ms[i], component, ds);
}
- IBinaryField[] fs = null;
- try {
- fs = cls.getFields();
- } catch (NoClassDefFoundError e) {
- //ignore
- }
- if(fs != null) for (int i = 0; i < fs.length; i++) {
- //TODO
- }
+// IBinaryField[] fs = null;
+// try {
+// fs = cls.getFields();
+// } catch (NoClassDefFoundError e) {
+// //ignore
+// }
+// if(fs != null) for (int i = 0; i < fs.length; i++) {
+// //TODO
+// }
}
private void process(IBinaryMethod m, SeamJavaComponentDeclaration component, LoadedDeclarations ds) {
@@ -314,7 +314,7 @@
try {
ms = type.getMethods();
} catch (JavaModelException e) {
- //ignore
+ SeamCorePlugin.getDefault().logError(e);
}
if(ms != null) for (int i = 0; i < ms.length; i++) {
if(!ms[i].getElementName().equals(name)) continue;
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java 2012-02-23 00:09:28 UTC (rev 39023)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java 2012-02-23 00:14:00 UTC (rev 39024)
@@ -333,6 +333,7 @@
try {
ft.createNewFile();
} catch (IOException e) {
+ SeamPagesXMLPlugin.getDefault().logError(e);
}
if(templateString != null) {
FileUtil.writeFile(ft, templateString);
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java 2012-02-23 00:09:28 UTC (rev 39023)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java 2012-02-23 00:14:00 UTC (rev 39024)
@@ -152,7 +152,7 @@
} catch (PartInitException e) {
SeamExtPlugin.getPluginLog().logError(e);
} catch (JavaModelException e) {
- // Ignore. It is probably because of Java element is not found
+ SeamExtPlugin.getPluginLog().logError(e);
}
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/builder/ToggleSeamNatureAction.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/builder/ToggleSeamNatureAction.java 2012-02-23 00:09:28 UTC (rev 39023)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/builder/ToggleSeamNatureAction.java 2012-02-23 00:14:00 UTC (rev 39024)
@@ -23,6 +23,7 @@
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.jboss.tools.seam.core.ISeamProject;
+import org.jboss.tools.seam.ui.SeamGuiPlugin;
/**
* Class for toggling the Seam Nature.
@@ -108,6 +109,7 @@
description.setNatureIds(newNatures);
project.setDescription(description, null);
} catch (CoreException e) {
+ SeamGuiPlugin.getDefault().logError(e);
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchResultPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchResultPage.java 2012-02-23 00:09:28 UTC (rev 39023)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchResultPage.java 2012-02-23 00:14:00 UTC (rev 39024)
@@ -72,6 +72,7 @@
import org.eclipse.ui.texteditor.ITextEditor;
import org.jboss.tools.common.java.IJavaSourceReference;
import org.jboss.tools.seam.core.IOpenableElement;
+import org.jboss.tools.seam.ui.SeamGuiPlugin;
/**
* Seam Search Result page
@@ -206,7 +207,7 @@
JavaUI.revealInEditor(part, (IJavaElement)javaElement);
}
} catch (JavaModelException e) {
- // Ignore. It is probably because of Java element is not found
+ SeamGuiPlugin.getDefault().logError(e);
}
} else if (match.getElement() instanceof IOpenableElement) {
((IOpenableElement)match.getElement()).open();
@@ -231,12 +232,11 @@
JavaUI.revealInEditor(part, (IJavaElement)javaElement);
}
} catch (JavaModelException e) {
- // Ignore. It is probably because of Java element is not found
+ SeamGuiPlugin.getDefault().logError(e);
}
-
}
}
-
+
private void showWithMarker(IEditorPart editor, IFile file, int offset, int length) throws PartInitException {
IMarker marker= null;
try {
@@ -253,7 +253,7 @@
try {
marker.delete();
} catch (CoreException e) {
- // ignore
+ SeamGuiPlugin.getDefault().logError(e);
}
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchVisitor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchVisitor.java 2012-02-23 00:09:28 UTC (rev 39023)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchVisitor.java 2012-02-23 00:14:00 UTC (rev 39024)
@@ -1091,6 +1091,7 @@
}
}
} catch (IndexOutOfBoundsException e) {
+ SeamGuiPlugin.getDefault().logError(e);
}
return false;
}
@@ -1228,7 +1229,6 @@
SearchPlugin.log(e);
} catch (CoreException e) {
SearchPlugin.log(e);
- } catch (StackOverflowError e) {
}
return false;
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/JavaStringHyperlinkDetector.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/JavaStringHyperlinkDetector.java 2012-02-23 00:09:28 UTC (rev 39023)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/JavaStringHyperlinkDetector.java 2012-02-23 00:14:00 UTC (rev 39024)
@@ -11,7 +11,6 @@
package org.jboss.tools.seam.ui.text.java;
-import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -23,12 +22,7 @@
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.MemberValuePair;
import org.eclipse.jdt.core.dom.MethodDeclaration;
-import org.eclipse.jdt.core.dom.NormalAnnotation;
-import org.eclipse.jdt.core.dom.SimpleName;
-import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
-import org.eclipse.jdt.core.dom.StringLiteral;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.jdt.internal.ui.text.JavaWordFinder;
@@ -45,7 +39,6 @@
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
import org.jboss.tools.seam.core.ISeamContextShortVariable;
import org.jboss.tools.seam.core.ISeamContextVariable;
-import org.jboss.tools.seam.core.ISeamFactory;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.internal.core.BijectedAttribute;
@@ -177,7 +170,7 @@
try {
ms = type.getMethods();
} catch (JavaModelException e) {
- //ignore
+ SeamGuiPlugin.getDefault().logError(e);
}
String name = m.getName().getIdentifier();
if(ms != null) for (int i = 0; i < ms.length; i++) {
@@ -227,9 +220,9 @@
JavaUI.revealInEditor(part, (IJavaElement)fMember);
}
} catch (PartInitException e) {
-// SeamExtPlugin.getPluginLog().logError(e);
+ SeamGuiPlugin.getDefault().logError(e);
} catch (JavaModelException e) {
- // Ignore. It is probably because of Java element is not found
+ SeamGuiPlugin.getDefault().logError(e);
}
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/scanner/JavaAnnotationScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/scanner/JavaAnnotationScanner.java 2012-02-23 00:09:28 UTC (rev 39023)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/scanner/JavaAnnotationScanner.java 2012-02-23 00:14:00 UTC (rev 39024)
@@ -2,7 +2,6 @@
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -23,39 +22,23 @@
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.ASTParser;
import org.eclipse.jdt.core.dom.ASTRequestor;
-import org.eclipse.jdt.core.dom.ASTVisitor;
import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
-import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.Block;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.FieldDeclaration;
-import org.eclipse.jdt.core.dom.MarkerAnnotation;
import org.eclipse.jdt.core.dom.MemberValuePair;
import org.eclipse.jdt.core.dom.MethodDeclaration;
-import org.eclipse.jdt.core.dom.Name;
import org.eclipse.jdt.core.dom.NormalAnnotation;
-import org.eclipse.jdt.core.dom.QualifiedName;
import org.eclipse.jdt.core.dom.SimpleName;
import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
import org.eclipse.jdt.core.dom.StringLiteral;
-import org.eclipse.jdt.core.dom.TypeDeclaration;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
-import org.eclipse.osgi.util.NLS;
-import org.jboss.tools.common.model.util.EclipseJavaUtil;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.common.util.FileUtil;
-import org.jboss.tools.seam.core.SeamCoreMessages;
-import org.jboss.tools.seam.internal.core.scanner.IFileScanner;
-import org.jboss.tools.seam.internal.core.scanner.LoadedDeclarations;
import org.jboss.tools.seam.internal.core.scanner.ScannerException;
-import org.jboss.tools.seam.internal.core.scanner.Util;
import org.jboss.tools.seam.internal.core.scanner.java.ASTVisitorImpl;
import org.jboss.tools.seam.internal.core.scanner.java.AnnotatedASTNode;
-import org.jboss.tools.seam.internal.core.scanner.java.ComponentBuilder;
-import org.jboss.tools.seam.internal.core.scanner.java.JavaScanner;
import org.jboss.tools.seam.internal.core.scanner.java.ResolvedAnnotation;
-import org.jboss.tools.seam.internal.core.scanner.java.SeamAnnotations;
+import org.jboss.tools.seam.ui.SeamGuiPlugin;
public class JavaAnnotationScanner {
@@ -171,7 +154,7 @@
try {
ts = source.getTypes();
} catch (JavaModelException e) {
- //ignore
+ SeamGuiPlugin.getDefault().logError(e);
}
if(ts == null || ts.length == 0) return;
for (int i = 0; i < ts.length; i++) {
@@ -386,7 +369,7 @@
return (rs[0][0].length() == 0) ? rs[0][1] : rs[0][0] + "." + rs[0][1]; //$NON-NLS-1$
}
} catch (JavaModelException e) {
- // ignore
+ SeamGuiPlugin.getDefault().logError(e);
}
return n;
12 years, 7 months
JBoss Tools SVN: r39023 - in trunk/jsf/docs/userguide/en-US: images/preferences and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-02-22 19:09:28 -0500 (Wed, 22 Feb 2012)
New Revision: 39023
Added:
trunk/jsf/docs/userguide/en-US/images/visual_page/icon_4.png
trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_css-import.png
Modified:
trunk/jsf/docs/userguide/en-US/Book_Info.xml
trunk/jsf/docs/userguide/en-US/editors.xml
trunk/jsf/docs/userguide/en-US/images/preferences/preferences_7.png
trunk/jsf/docs/userguide/en-US/preferences.xml
Log:
updated with all of beta1 content
Modified: trunk/jsf/docs/userguide/en-US/Book_Info.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/Book_Info.xml 2012-02-22 23:49:39 UTC (rev 39022)
+++ trunk/jsf/docs/userguide/en-US/Book_Info.xml 2012-02-23 00:09:28 UTC (rev 39023)
@@ -7,7 +7,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>5.0</productnumber>
<edition>5.0.0</edition>
-<pubsnumber>6</pubsnumber>
+<pubsnumber>7</pubsnumber>
<abstract>
<para>The Visual Web Tools Reference Guide explains extensive collection of specialized wizards, editors and views that can be used in various scenarios while developing Web applications.</para>
</abstract>
Modified: trunk/jsf/docs/userguide/en-US/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/editors.xml 2012-02-22 23:49:39 UTC (rev 39022)
+++ trunk/jsf/docs/userguide/en-US/editors.xml 2012-02-23 00:09:28 UTC (rev 39023)
@@ -1340,7 +1340,17 @@
<para>
One more way to toggle between the various states of the split pane is using the <keycombo><keycap>Shift</keycap><keycap>F6</keycap></keycombo> keyboard shortcut for maximizing or restoring the <guilabel>Source</guilabel> part and <keycombo><keycap>Shift</keycap><keycap>Alt</keycap><keycap>F6</keycap></keycombo> for maximizing or restoring the <guilabel>Visual</guilabel> part.
</para>
-
+ <para>
+ You can synchronize the scrolling between the source and visual panes by clicking the <guibutton>Synchronize scrolling between source and visual panes</guibutton>
+ (<inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/icon_4.png"/>
+ </imageobject>
+ <textobject>
+ <phrase>Synchronize scrolling between source and visual panes</phrase>
+ </textobject>
+</inlinemediaobject>) button in the toolbar of the Web Development perspective. This will ensure that scrolling in one window pane will automatically scroll the other pane to the same location.
+ </para>
<note>
<title>Tip:</title>
<para>
@@ -1687,9 +1697,31 @@
</section>
<section id="external_stylesheets">
- <title>External Stylesheets</title>
+ <title>External Stylesheets (CSS)</title>
<para>
- The pages you are working with in the Visual Page Editor can use external stylesheets. The Visual Page Editor allows you to create new style classes in existing stylesheets, as well as edit them. The <guilabel>Edit Style Class</guilabel> dialog is provided for this purposes.
+ The pages you are working with in the Visual Page Editor can use external stylesheets.
+ </para>
+ <section>
+ <title>Importing a stylesheet</title>
+ <para>
+ You can import an existing stylesheet by using the <property>@import</property> annotation within your webpage file. The annotation for importing a file is structured as <property>@import "path/to/file.css";</property>.
+ </para>
+ <para>
+ An example of how it is used can be seen below:
+ </para>
+ <figure>
+ <title>Importing a stylesheet</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_css-import.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section>
+ <title>Modifying an existing stylesheet</title>
+ <para>
+ The Visual Page Editor allows you to create new style classes in existing stylesheets, as well as edit them. The <guilabel>Edit Style Class</guilabel> dialog is provided for this purposes.
</para>
<para>
@@ -1839,6 +1871,7 @@
<para>
Choose the appropriate <filename>CSS</filename> file and click on the <guibutton>OK</guibutton> button.
</para>
+ </section>
</section>
</section>
Modified: trunk/jsf/docs/userguide/en-US/images/preferences/preferences_7.png
===================================================================
(Binary files differ)
Added: trunk/jsf/docs/userguide/en-US/images/visual_page/icon_4.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en-US/images/visual_page/icon_4.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_css-import.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_css-import.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/jsf/docs/userguide/en-US/preferences.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/preferences.xml 2012-02-22 23:49:39 UTC (rev 39022)
+++ trunk/jsf/docs/userguide/en-US/preferences.xml 2012-02-23 00:09:28 UTC (rev 39023)
@@ -504,6 +504,19 @@
</thead>
<tbody>
+ <row>
+ <entry>
+ Show toolbar within the editor (otherwise in Eclipse's toolbar)
+ </entry>
+
+ <entry>
+ The option allows to select where the Visual Page Editor toolbar appears. By default it appears as part of the Eclipse toolbar.
+ </entry>
+
+ <entry>
+ Off
+ </entry>
+ </row>
<row>
<entry>
Show border for unknown tags
@@ -590,18 +603,30 @@
<row>
<entry>
- Ask for confirmation when closing the Selection Bar
+ Inform if the project is not configured properly to use Visual Page Editor
</entry>
<entry>
- Check this box if you don't want the confirmation window appears when closing the Selection Bar
+ If this option is deselected you will not be notified that a project is not configured for use with the Visual Page Editor. This may cause unexpected results.
</entry>
<entry>
On
</entry>
</row>
-
+ <row>
+ <entry>
+ Synchronize scrolling between source and visual panes
+ </entry>
+
+ <entry>
+ This option allows you to set the scrollbars of the source and visual panes of the editor to be synchronized by default. An option to activate and deactivate this option exists as part of the toolbar.
+ </entry>
+
+ <entry>
+ Off
+ </entry>
+ </row>
<row>
<entry>
Select the default active editor's tab
12 years, 7 months
JBoss Tools SVN: r39022 - branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-22 18:49:39 -0500 (Wed, 22 Feb 2012)
New Revision: 39022
Modified:
branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/DelegatingProgressMonitor.java
branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/WizardUtils.java
Log:
[JBIDE-10979] now calling #done on the wizard monitor only (was: on the delegate monitor, too) since the job monitor is then already gone and would cause "widget disposed error"
Modified: branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/DelegatingProgressMonitor.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/DelegatingProgressMonitor.java 2012-02-22 23:47:35 UTC (rev 39021)
+++ branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/DelegatingProgressMonitor.java 2012-02-22 23:49:39 UTC (rev 39022)
@@ -25,7 +25,7 @@
List<IProgressMonitor> monitors = new ArrayList<IProgressMonitor>();
- public void add(IProgressMonitor monitor) {
+ public synchronized void add(IProgressMonitor monitor) {
if (monitors.size() > 0) {
IProgressMonitor removed = monitors.remove(0);
monitors.add(monitor);
@@ -36,35 +36,35 @@
}
@Override
- public void subTask(final String name) {
+ public synchronized void subTask(final String name) {
for (IProgressMonitor monitor : monitors) {
monitor.subTask(name);
}
}
@Override
- public void beginTask(final String name, final int totalWork) {
+ public synchronized void beginTask(final String name, final int totalWork) {
for (IProgressMonitor monitor : monitors) {
monitor.beginTask(name, totalWork);
}
}
@Override
- public void done() {
+ public synchronized void done() {
for (IProgressMonitor monitor : monitors) {
monitor.done();
}
}
@Override
- public void internalWorked(final double work) {
+ public synchronized void internalWorked(final double work) {
for (IProgressMonitor monitor : monitors) {
monitor.internalWorked(work);
}
}
@Override
- public boolean isCanceled() {
+ public synchronized boolean isCanceled() {
for (IProgressMonitor monitor : monitors) {
if (monitor.isCanceled()) {
return true;
@@ -74,21 +74,21 @@
}
@Override
- public void setCanceled(final boolean value) {
+ public synchronized void setCanceled(final boolean value) {
for (IProgressMonitor monitor : monitors) {
monitor.setCanceled(value);
}
}
@Override
- public void setTaskName(final String name) {
+ public synchronized void setTaskName(final String name) {
for (IProgressMonitor monitor : monitors) {
monitor.setTaskName(name);
}
}
@Override
- public void worked(final int work) {
+ public synchronized void worked(final int work) {
for (IProgressMonitor monitor : monitors) {
monitor.worked(work);
}
Modified: branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/WizardUtils.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/WizardUtils.java 2012-02-22 23:47:35 UTC (rev 39021)
+++ branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/WizardUtils.java 2012-02-22 23:49:39 UTC (rev 39022)
@@ -37,11 +37,11 @@
}
/**
- * Runs the given job in the given wizard container. This method will return immediately, it will not wait for the
- * job completion.
+ * Runs the given job in the given wizard container. This method will return
+ * immediately, it will not wait for the job completion.
* <p>
- * In order to have the wizard displaying a progress bar, you need to set Wizard#setNeedsProgressMonitor to
- * <code>true</code>.
+ * In order to have the wizard displaying a progress bar, you need to set
+ * Wizard#setNeedsProgressMonitor to <code>true</code>.
*
* @param job
* the job to run
@@ -64,13 +64,14 @@
/**
* Runs the given job in the given wizard container.
* <p>
- * In order to have the wizard displaying a progress bar, you need to set Wizard#setNeedsProgressMonitor to
- * <code>true</code>.
+ * In order to have the wizard displaying a progress bar, you need to set
+ * Wizard#setNeedsProgressMonitor to <code>true</code>.
*
* @param job
* the job to run in the wizard
* @param delegatingMonitor
- * the delegating monitor that the wizard monitor shall be added to.
+ * the delegating monitor that the wizard monitor shall be added
+ * to.
* @param container
* the wizard container to run the job in
* @return a future that allows you to wait for the job result
@@ -81,17 +82,31 @@
final IWizardContainer container) throws InvocationTargetException, InterruptedException {
return runInWizard(job, delegatingMonitor, container, 120);
}
-
+
/**
* Runs the given job in the given wizard container.
* <p>
- * In order to have the wizard displaying a progress bar, you need to set Wizard#setNeedsProgressMonitor to
- * <code>true</code>.
+ * In order to have the wizard displaying a progress bar, you need to set
+ * Wizard#setNeedsProgressMonitor to <code>true</code>.
+ * <p>
+ * In order to be able to report updates in the job to the wizard progress,
+ * you'd have to use the {@link DelegatingProgressMonitor}. Add your job
+ * monitor to that aggregating monitor and call #subTask #done etc. on that
+ * one (@link https://bugs.eclipse.org/bugs/show_bug.cgi?id=293098)
*
+ * <code>
+ * DelegatingProgressMonitor delegate = new DelegatingProgressMonitor();
+ * delegate.add(myJobMonitor)
+ * delegate.add(wizardMonitor)
+ * ...
+ * delegate.subTask("now reporting to the delegate so that progress is shown in workbench and wizard");
+ * </code>
+ *
* @param job
* the job to run in the wizard
* @param delegatingMonitor
- * the delegating monitor that the wizard monitor shall be added to.
+ * the delegating monitor that the wizard monitor shall be added
+ * to.
* @param container
* the wizard container to run the job in
* @return a future that allows you to wait for the job result
@@ -104,18 +119,21 @@
container.run(true, true, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- IProgressMonitor monitorToUse = setupDelegatingMonitorIfPresent(delegatingMonitor, monitor);
- monitorToUse.beginTask(job.getName(), IProgressMonitor.UNKNOWN);
+ if (delegatingMonitor != null) {
+ delegatingMonitor.add(monitor);
+ }
+ monitor.beginTask(job.getName(), IProgressMonitor.UNKNOWN);
job.schedule();
try {
future.get(timeout, TimeUnit.SECONDS);
} catch (ExecutionException e) {
} catch (TimeoutException e) {
+ } finally {
+ monitor.done();
}
- monitorToUse.done();
}
});
- if(future.isDone()) {
+ if (future.isDone()) {
return job.getResult();
}
CommonUIPlugin.getDefault().logError("Operation did not complete in a reasonnable amount of time");
@@ -124,31 +142,15 @@
}
/**
- * Returns the delegating monitor if present or the simple monitor otherwise. The simple monitor is added to the
- * delegating one.
- *
- * @param delegatingMonitor
- * @param monitor
- * @return
- */
- private static IProgressMonitor setupDelegatingMonitorIfPresent(DelegatingProgressMonitor delegatingMonitor,
- IProgressMonitor monitor) {
- if (delegatingMonitor == null) {
- return monitor;
- }
-
- delegatingMonitor.add(monitor);
- return delegatingMonitor;
- }
-
- /**
* Runs the given job in the given wizard container.
* <p>
- * Furhtermore it updates the models and targets of the given data binding context. This might be necessary if the
- * given job will change widget enablements in the calling wizard page. The reason for is that the runner saves the
- * widget enablement states when it's up to execute the runnable. It then restores those states once he finished
- * executing the runnable. It may therefore restore incorrect states since the job changed the enablements when it
- * was run.
+ * Furhtermore it updates the models and targets of the given data binding
+ * context. This might be necessary if the given job will change widget
+ * enablements in the calling wizard page. The reason for is that the runner
+ * saves the widget enablement states when it's up to execute the runnable.
+ * It then restores those states once he finished executing the runnable. It
+ * may therefore restore incorrect states since the job changed the
+ * enablements when it was run.
*
* @param job
* the job
12 years, 7 months
JBoss Tools SVN: r39021 - trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-22 18:47:35 -0500 (Wed, 22 Feb 2012)
New Revision: 39021
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/DelegatingProgressMonitor.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/WizardUtils.java
Log:
[JBIDE-10979] now calling #done on the wizard monitor only (was: on the delegate monitor, too) since the job monitor is then already gone and would cause "widget disposed error"
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/DelegatingProgressMonitor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/DelegatingProgressMonitor.java 2012-02-22 22:59:09 UTC (rev 39020)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/DelegatingProgressMonitor.java 2012-02-22 23:47:35 UTC (rev 39021)
@@ -25,7 +25,7 @@
List<IProgressMonitor> monitors = new ArrayList<IProgressMonitor>();
- public void add(IProgressMonitor monitor) {
+ public synchronized void add(IProgressMonitor monitor) {
if (monitors.size() > 0) {
IProgressMonitor removed = monitors.remove(0);
monitors.add(monitor);
@@ -36,35 +36,35 @@
}
@Override
- public void subTask(final String name) {
+ public synchronized void subTask(final String name) {
for (IProgressMonitor monitor : monitors) {
monitor.subTask(name);
}
}
@Override
- public void beginTask(final String name, final int totalWork) {
+ public synchronized void beginTask(final String name, final int totalWork) {
for (IProgressMonitor monitor : monitors) {
monitor.beginTask(name, totalWork);
}
}
@Override
- public void done() {
+ public synchronized void done() {
for (IProgressMonitor monitor : monitors) {
monitor.done();
}
}
@Override
- public void internalWorked(final double work) {
+ public synchronized void internalWorked(final double work) {
for (IProgressMonitor monitor : monitors) {
monitor.internalWorked(work);
}
}
@Override
- public boolean isCanceled() {
+ public synchronized boolean isCanceled() {
for (IProgressMonitor monitor : monitors) {
if (monitor.isCanceled()) {
return true;
@@ -74,21 +74,21 @@
}
@Override
- public void setCanceled(final boolean value) {
+ public synchronized void setCanceled(final boolean value) {
for (IProgressMonitor monitor : monitors) {
monitor.setCanceled(value);
}
}
@Override
- public void setTaskName(final String name) {
+ public synchronized void setTaskName(final String name) {
for (IProgressMonitor monitor : monitors) {
monitor.setTaskName(name);
}
}
@Override
- public void worked(final int work) {
+ public synchronized void worked(final int work) {
for (IProgressMonitor monitor : monitors) {
monitor.worked(work);
}
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/WizardUtils.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/WizardUtils.java 2012-02-22 22:59:09 UTC (rev 39020)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/WizardUtils.java 2012-02-22 23:47:35 UTC (rev 39021)
@@ -37,11 +37,11 @@
}
/**
- * Runs the given job in the given wizard container. This method will return immediately, it will not wait for the
- * job completion.
+ * Runs the given job in the given wizard container. This method will return
+ * immediately, it will not wait for the job completion.
* <p>
- * In order to have the wizard displaying a progress bar, you need to set Wizard#setNeedsProgressMonitor to
- * <code>true</code>.
+ * In order to have the wizard displaying a progress bar, you need to set
+ * Wizard#setNeedsProgressMonitor to <code>true</code>.
*
* @param job
* the job to run
@@ -64,13 +64,14 @@
/**
* Runs the given job in the given wizard container.
* <p>
- * In order to have the wizard displaying a progress bar, you need to set Wizard#setNeedsProgressMonitor to
- * <code>true</code>.
+ * In order to have the wizard displaying a progress bar, you need to set
+ * Wizard#setNeedsProgressMonitor to <code>true</code>.
*
* @param job
* the job to run in the wizard
* @param delegatingMonitor
- * the delegating monitor that the wizard monitor shall be added to.
+ * the delegating monitor that the wizard monitor shall be added
+ * to.
* @param container
* the wizard container to run the job in
* @return a future that allows you to wait for the job result
@@ -81,17 +82,31 @@
final IWizardContainer container) throws InvocationTargetException, InterruptedException {
return runInWizard(job, delegatingMonitor, container, 120);
}
-
+
/**
* Runs the given job in the given wizard container.
* <p>
- * In order to have the wizard displaying a progress bar, you need to set Wizard#setNeedsProgressMonitor to
- * <code>true</code>.
+ * In order to have the wizard displaying a progress bar, you need to set
+ * Wizard#setNeedsProgressMonitor to <code>true</code>.
+ * <p>
+ * In order to be able to report updates in the job to the wizard progress,
+ * you'd have to use the {@link DelegatingProgressMonitor}. Add your job
+ * monitor to that aggregating monitor and call #subTask #done etc. on that
+ * one (@link https://bugs.eclipse.org/bugs/show_bug.cgi?id=293098)
*
+ * <code>
+ * DelegatingProgressMonitor delegate = new DelegatingProgressMonitor();
+ * delegate.add(myJobMonitor)
+ * delegate.add(wizardMonitor)
+ * ...
+ * delegate.subTask("now reporting to the delegate so that progress is shown in workbench and wizard");
+ * </code>
+ *
* @param job
* the job to run in the wizard
* @param delegatingMonitor
- * the delegating monitor that the wizard monitor shall be added to.
+ * the delegating monitor that the wizard monitor shall be added
+ * to.
* @param container
* the wizard container to run the job in
* @return a future that allows you to wait for the job result
@@ -104,18 +119,21 @@
container.run(true, true, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- IProgressMonitor monitorToUse = setupDelegatingMonitorIfPresent(delegatingMonitor, monitor);
- monitorToUse.beginTask(job.getName(), IProgressMonitor.UNKNOWN);
+ if (delegatingMonitor != null) {
+ delegatingMonitor.add(monitor);
+ }
+ monitor.beginTask(job.getName(), IProgressMonitor.UNKNOWN);
job.schedule();
try {
future.get(timeout, TimeUnit.SECONDS);
} catch (ExecutionException e) {
} catch (TimeoutException e) {
+ } finally {
+ monitor.done();
}
- monitorToUse.done();
}
});
- if(future.isDone()) {
+ if (future.isDone()) {
return job.getResult();
}
CommonUIPlugin.getDefault().logError("Operation did not complete in a reasonnable amount of time");
@@ -124,31 +142,15 @@
}
/**
- * Returns the delegating monitor if present or the simple monitor otherwise. The simple monitor is added to the
- * delegating one.
- *
- * @param delegatingMonitor
- * @param monitor
- * @return
- */
- private static IProgressMonitor setupDelegatingMonitorIfPresent(DelegatingProgressMonitor delegatingMonitor,
- IProgressMonitor monitor) {
- if (delegatingMonitor == null) {
- return monitor;
- }
-
- delegatingMonitor.add(monitor);
- return delegatingMonitor;
- }
-
- /**
* Runs the given job in the given wizard container.
* <p>
- * Furhtermore it updates the models and targets of the given data binding context. This might be necessary if the
- * given job will change widget enablements in the calling wizard page. The reason for is that the runner saves the
- * widget enablement states when it's up to execute the runnable. It then restores those states once he finished
- * executing the runnable. It may therefore restore incorrect states since the job changed the enablements when it
- * was run.
+ * Furhtermore it updates the models and targets of the given data binding
+ * context. This might be necessary if the given job will change widget
+ * enablements in the calling wizard page. The reason for is that the runner
+ * saves the widget enablement states when it's up to execute the runnable.
+ * It then restores those states once he finished executing the runnable. It
+ * may therefore restore incorrect states since the job changed the
+ * enablements when it was run.
*
* @param job
* the job
12 years, 7 months
JBoss Tools SVN: r39020 - in trunk/documentation/whatsnew/esb: images and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2012-02-22 17:59:09 -0500 (Wed, 22 Feb 2012)
New Revision: 39020
Added:
trunk/documentation/whatsnew/esb/esb-news-1.5.0.beta1.html
trunk/documentation/whatsnew/esb/images/esb_dependency_visualizer.jpg
Log:
[JBIDE-10368] Created first draft of the ESB-related N&N for 3.3 beta1
Added: trunk/documentation/whatsnew/esb/esb-news-1.5.0.beta1.html
===================================================================
--- trunk/documentation/whatsnew/esb/esb-news-1.5.0.beta1.html (rev 0)
+++ trunk/documentation/whatsnew/esb/esb-news-1.5.0.beta1.html 2012-02-22 22:59:09 UTC (rev 39020)
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css"/>
+<title>ESB tools 1.5.1 M4 What's New</title>
+<script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-17645367-5']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+</script></head>
+<body>
+<h1>ESB tools 1.5.0 Beta1 What's New</h1>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a
+href="../examples/examples-news-3.3.0.beta1.html">Project Examples ></a></p>
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>New Dependency Visualizer</h3>
+ <hr/>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="right"><a name="itemname1" id="itemname1"></a><b>ESB 4.10 Support</b></td>
+ <td valign="top">
+ <p>We have a new dependency visualizer for ESB that shows a graphical view of an ESB configuration file. This is useful to show dependencies between components - like how queues are referenced by listeners.</p>
+ <img src="./images/esb_dependency_visualizer.jpg" alt="" style=" width : 646px; height : 267px;"/>
+ <p>The tool has the following functionality:</p>
+ <ul>
+ <li>Can be opened by right-clicking on any ESB configuration file and selecting "Show In->JBoss ESB Configuration Visualizer"</li>
+ <li>If already open and you select a different ESB configuration file, the view will refresh to show the new file automatically.</li>
+ <li>Though read-only, you can double-click on any element to open the ESB file and show that component in the JBoss ESB Editor.</li>
+ <li>You can change the layout of nodes in the view by selecting one of the following three options on the toolbar: Horizontal Tree (default), Vertical Tree, and Radial. Each offers a different perspective on the configuration.</li>
+ <li>You can move each node on the canvas independently.</li>
+ <li>If you want to freeze a node you've moved so you can refresh the layout to see other nodes more clearly, you can right-click on a node and select "Freeze Node on Double-click" (or select it in the View menu drop-down). With this mode activated, simply double-click on the node you want to freeze. The border changes to a thicker line to indicate that a node is frozen. You can still move it manually, but the node no longer moves when you select a different layout type.</li>
+ </ul>
+ <p><small>Related Jira: <a href="https://jira.jboss.org/browse/JBIDE-10726">JBIDE-10726</a></small></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+</table>
+</body>
+
+</html>
+
+
Property changes on: trunk/documentation/whatsnew/esb/esb-news-1.5.0.beta1.html
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/documentation/whatsnew/esb/images/esb_dependency_visualizer.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/esb/images/esb_dependency_visualizer.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
12 years, 7 months