Author: rob.stryker(a)jboss.com
Date: 2009-07-27 17:11:27 -0400 (Mon, 27 Jul 2009)
New Revision: 16830
Added:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependenciesPropertyPage.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependencyPageProvider.java
Removed:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependenciesPropertyPage.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependencyPageProvider.java
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/ComponentCoreUIPlugin.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/Messages.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/messages.properties
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IDependencyPageProvider.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IModuleDependenciesControl.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddFolderDialog.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddModuleDependenciesPropertiesPage.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ComponentDependencyContentProvider.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/DependencyPageExtensionManager.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ExternalJarReferenceWizardFragment.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/JarReferenceWizardFragment.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ModuleAssemblyRootPage.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceRootWizardFragment.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceWizard.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ProjectReferenceWizardFragment.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/VariableReferenceWizardFragment.java
Log:
cleaning up workspace = string externalization
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/ComponentCoreUIPlugin.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/ComponentCoreUIPlugin.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/ComponentCoreUIPlugin.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui;
import org.eclipse.core.runtime.CoreException;
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/Messages.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/Messages.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/Messages.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -4,8 +4,29 @@
public class Messages extends NLS {
private static final String BUNDLE_NAME =
"org.eclipse.wst.common.componentcore.ui.messages"; //$NON-NLS-1$
- public static String AddModuleDependenciesPropertiesPage_DeployPathColumn;
- public static String AddModuleDependenciesPropertiesPage_SourceColumn;
+ public static String ModuleAssemblyRootPageDescription;
+ public static String ModuleAssembly;
+ public static String ErrorCheckingFacets;
+ public static String ErrorNotVirtualComponent;
+ public static String DeployPathColumn;
+ public static String SourceColumn;
+ public static String AddFolder;
+ public static String AddFolderElipses;
+ public static String AddReference;
+ public static String RemoveSelected;
+ public static String JarTitle;
+ public static String JarDescription;
+ public static String ExternalJarTitle;
+ public static String ExternalJarDescription;
+ public static String Browse;
+ public static String NewReferenceTitle;
+ public static String NewReferenceDescription;
+ public static String NewReferenceWizard;
+ public static String ProjectReferenceTitle;
+ public static String ProjectReferenceDescription;
+ public static String VariableReferenceTitle;
+ public static String VariableReferenceDescription;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/messages.properties
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/messages.properties 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/messages.properties 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,7 +1,22 @@
-AddModuleDependenciesPropertiesPage_AddProjectButton=Add Project...
-AddModuleDependenciesPropertiesPage_DeployPathColumn=Deploy Path
-AddModuleDependenciesPropertiesPage_RemoveSelectedButton=Remove selected...
-AddModuleDependenciesPropertiesPage_SelectAProjectTitle=Select a Project
-AddModuleDependenciesPropertiesPage_SourceColumn=Source
-J2EEDependenciesPage_Description=ModuleDependency Page Description
-J2EEDependenciesPage_ErrorCheckingFacets=Error Checking Project Facets
+ModuleAssemblyRootPageDescription=TODO Change this: Create and change packaging structure
for this project
+ModuleAssembly=Module Assembly
+ErrorCheckingFacets=Error Checking Project Facets
+ErrorNotVirtualComponent=The given project is not a virtual component project
+DeployPathColumn=Deploy Path
+SourceColumn=Source
+AddFolder=Add Folder
+AddFolderElipses=Add Folder...
+AddReference=Add Reference...
+RemoveSelected=Remove selected
+ExternalJarTitle=Add an External Jar Reference
+ExternalJarDescription=Here you can reference a filesystem Jar\nThis is not a suggested
use-case, but is here for backwards compatability.
+JarTitle=Add a Jar Reference
+JarDescription="Here you can reference a workspace Jar\nThis is not a suggested
use-case, but is here for backwards compatability.
+Browse=Browse...
+NewReferenceTitle=Select a reference type
+NewReferenceDescription=Here you can select one of many types of references to add
+NewReferenceWizard=New Reference Wizard
+ProjectReferenceTitle=Add a Project Reference
+ProjectReferenceDescription=Here you can make a project into a reference.\nIf the project
is not already a flexible project, it will be converted into one.
+VariableReferenceTitle=Add a Variable Reference
+VariableReferenceDescription="Here you can reference a variable which maps to a
single jar.\nThis is not a suggested use-case, but is here for backwards compatability.
\ No newline at end of file
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IDependencyPageProvider.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IDependencyPageProvider.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IDependencyPageProvider.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,11 +1,55 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage;
import org.eclipse.swt.widgets.Composite;
+import
org.eclipse.wst.common.componentcore.ui.propertypage.internal.DependencyPageExtensionManager;
import
org.eclipse.wst.common.componentcore.ui.propertypage.internal.ModuleAssemblyRootPage;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+/**
+ * Suggested use case of this class is as follows:
+ *
+ * provider = DependencyPageExtensionManager.getManager().getProvider(facetedProject);
+ * if( provider != null ) {
+ * controls = provider.createPages(facetedProject, this);
+ * Composite root = provider.createRootControl(controls, parent);
+ * }
+ */
public interface IDependencyPageProvider {
+ /**
+ * Returns true if this page provider knows how to
+ * handle the given faceted project, false otherwise
+ * @param project a project
+ * @return true if this provider can handle it, false otherwise
+ */
public boolean canHandle(IFacetedProject project);
+
+ /**
+ * Returns a list of page control objects which should be
+ * presented to the user for this project type.
+ *
+ * @param project
+ * @param parent
+ * @return
+ */
public IModuleDependenciesControl[] createPages(IFacetedProject project,
ModuleAssemblyRootPage parent);
+
+ /**
+ * Turn this array of pages / controls into one root control
+ * that can be returned to the Properties Page container.
+
+ * @param pages
+ * @param parent
+ * @return
+ */
public Composite createRootControl(IModuleDependenciesControl[] pages, Composite
parent);
}
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IModuleDependenciesControl.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IModuleDependenciesControl.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IModuleDependenciesControl.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage;
import org.eclipse.swt.widgets.Composite;
@@ -2,2 +12,7 @@
+/**
+ * This represents one control which may be present on a page
+ * and requires to listen in to the specific lifecycle
+ * events of the page.
+ */
public interface IModuleDependenciesControl {
Copied:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependenciesPropertyPage.java
(from rev 16828,
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependenciesPropertyPage.java)
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependenciesPropertyPage.java
(rev 0)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependenciesPropertyPage.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
+package org.eclipse.wst.common.componentcore.ui.propertypage.ear;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IProgressMonitor;
+import
org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModelProvider;
+import
org.eclipse.jst.j2ee.application.internal.operations.RemoveComponentFromEnterpriseApplicationDataModelProvider;
+import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
+import org.eclipse.jst.jee.project.facet.EarCreateDeploymentFilesDataModelProvider;
+import org.eclipse.jst.jee.project.facet.ICreateDeploymentFilesDataModelProperties;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import
org.eclipse.wst.common.componentcore.ui.propertypage.internal.AddModuleDependenciesPropertiesPage;
+import
org.eclipse.wst.common.componentcore.ui.propertypage.internal.ModuleAssemblyRootPage;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
+
+public class EarModuleDependenciesPropertyPage extends
+ AddModuleDependenciesPropertiesPage {
+ public EarModuleDependenciesPropertyPage(IProject project,
+ ModuleAssemblyRootPage page) {
+ super(project, page);
+ }
+
+ protected IDataModelOperation generateEARDDOperation() {
+ IDataModel model = DataModelFactory.createDataModel(new
EarCreateDeploymentFilesDataModelProvider());
+ model.setProperty(ICreateDeploymentFilesDataModelProperties.GENERATE_DD,
rootComponent);
+ model.setProperty(ICreateDeploymentFilesDataModelProperties.TARGET_PROJECT, project);
+ return model.getDefaultOperation();
+ }
+
+ public boolean postHandleChanges(IProgressMonitor monitor) {
+ return true;
+ }
+
+ protected void handleRemoved(ArrayList<IVirtualComponent> removed) {
+ super.handleRemoved(removed);
+ J2EEComponentClasspathUpdater.getInstance().queueUpdateEAR(rootComponent.getProject());
+ }
+
+ protected IDataModelProvider getRemoveReferenceDataModelProvider(Object component) {
+ return new RemoveComponentFromEnterpriseApplicationDataModelProvider();
+ }
+
+// protected void postAddProjects(Set moduleProjects) throws CoreException {
+// EarFacetRuntimeHandler.updateModuleProjectRuntime(rootComponent.getProject(),
moduleProjects, new NullProgressMonitor());
+// }
+
+ protected IDataModelProvider getAddReferenceDataModelProvider(IVirtualComponent
component) {
+ return new AddComponentToEnterpriseApplicationDataModelProvider();
+ }
+}
Copied:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependencyPageProvider.java
(from rev 16828,
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependencyPageProvider.java)
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependencyPageProvider.java
(rev 0)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependencyPageProvider.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
+package org.eclipse.wst.common.componentcore.ui.propertypage.ear;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.common.componentcore.ui.propertypage.IDependencyPageProvider;
+import org.eclipse.wst.common.componentcore.ui.propertypage.IModuleDependenciesControl;
+import
org.eclipse.wst.common.componentcore.ui.propertypage.internal.ModuleAssemblyRootPage;
+
+public class EarModuleDependencyPageProvider implements IDependencyPageProvider {
+
+ public boolean canHandle(IFacetedProject project) {
+ boolean isEAR =
project.hasProjectFacet(ProjectFacetsManager.getProjectFacet("jst.ear"));
//$NON-NLS-1$
+ return isEAR;
+ }
+
+ public IModuleDependenciesControl[] createPages(IFacetedProject project,
+ ModuleAssemblyRootPage parent) {
+ return new IModuleDependenciesControl[] {
+ new EarModuleDependenciesPropertyPage(project.getProject(), parent)
+ };
+ }
+
+ public Composite createRootControl(IModuleDependenciesControl[] pages,
+ Composite parent) {
+ if( pages.length == 1 && pages[0] != null)
+ return pages[0].createContents(parent);
+ return null;
+ }
+}
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddFolderDialog.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddFolderDialog.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddFolderDialog.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import org.eclipse.core.resources.IContainer;
@@ -21,6 +31,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.common.componentcore.ui.Messages;
public class AddFolderDialog extends TitleAreaDialog {
private IProject project;
@@ -33,7 +44,7 @@
protected void configureShell(Shell shell) {
super.configureShell(shell);
- shell.setText("Add Folder");
+ shell.setText(Messages.AddFolder);
shell.setBounds(shell.getLocation().x, shell.getLocation().y, 400,300);
}
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddModuleDependenciesPropertiesPage.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddModuleDependenciesPropertiesPage.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddModuleDependenciesPropertiesPage.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,15 +1,13 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*
http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider(a)unisys.com - [142500] WTP properties pages fonts
don't follow Eclipse preferences
- * Stefan Dimov, stefan.dimov(a)sap.com - bugs 207826, 222651
- *******************************************************************************/
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
@@ -75,8 +73,8 @@
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.common.componentcore.ui.ComponentCoreUIPlugin;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.common.componentcore.ui.propertypage.IModuleDependenciesControl;
import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
@@ -139,7 +137,7 @@
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
ModuleAssemblyRootPage.createDescriptionComposite(composite,
- "TODO Change this: Create and change packaging structure for this project
");
+ Messages.ModuleAssemblyRootPageDescription);
createListGroup(composite);
refresh();
Dialog.applyDialogFont(parent);
@@ -160,7 +158,7 @@
availableModules = new Label(listGroup, SWT.NONE);
gData = new GridData(GridData.HORIZONTAL_ALIGN_FILL
| GridData.VERTICAL_ALIGN_FILL);
- availableModules.setText("Module Assembly"); //$NON-NLS-1$
+ availableModules.setText(Messages.ModuleAssembly);
availableModules.setLayoutData(gData);
createTableComposite(listGroup);
}
@@ -190,9 +188,9 @@
}
protected void createPushButtons() {
- addMappingButton = createPushButton("Add Folder...");
- addReferenceButton = createPushButton("Add Reference...");
- removeButton = createPushButton("Remove selected");
+ addMappingButton = createPushButton(Messages.AddFolderElipses);
+ addReferenceButton = createPushButton(Messages.AddReference);
+ removeButton = createPushButton(Messages.RemoveSelected);
}
protected Button createPushButton(String label) {
@@ -401,7 +399,7 @@
} else if( data instanceof ComponentResourceProxy) {
return ((ComponentResourceProxy)data).runtimePath.toString();
}
- return new Path("/");
+ return new Path("/"); //$NON-NLS-1$
}
public void modify(Object element, String property, Object value) {
@@ -435,7 +433,7 @@
IContainer c = afd.getSelected();
if( c != null ) {
IPath p = c.getProjectRelativePath();
- ComponentResourceProxy proxy = new ComponentResourceProxy(p, new
Path("/"));
+ ComponentResourceProxy proxy = new ComponentResourceProxy(p, new
Path("/")); //$NON-NLS-1$
resourceMappings.add(proxy);
refresh();
}
@@ -493,11 +491,11 @@
availableComponentsViewer.setSorter(null);
TableColumn bndColumn = new TableColumn(table, SWT.NONE, 0);
- bndColumn.setText(Messages.AddModuleDependenciesPropertiesPage_DeployPathColumn);
+ bndColumn.setText(Messages.DeployPathColumn);
bndColumn.setResizable(true);
TableColumn projectColumn = new TableColumn(table, SWT.NONE, 1);
- projectColumn.setText(Messages.AddModuleDependenciesPropertiesPage_SourceColumn);
+ projectColumn.setText(Messages.SourceColumn);
projectColumn.setResizable(true);
tableLayout.layout(table, true);
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ComponentDependencyContentProvider.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ComponentDependencyContentProvider.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ComponentDependencyContentProvider.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,14 +1,13 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*
http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
- * Stefan Dimov, stefan.dimov(a)sap.com - bug 207826
- *******************************************************************************/
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/DependencyPageExtensionManager.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/DependencyPageExtensionManager.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/DependencyPageExtensionManager.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
@@ -58,9 +68,9 @@
IConfigurationElement[] cf = registry.getConfigurationElementsFor(
ComponentCoreUIPlugin.PLUGIN_ID, "referenceWizardFragment"); //$NON-NLS-1$
for( int i = 0; i < cf.length; i++ ) {
- if( cf[i].getAttribute("id").equals(id))
+ if( cf[i].getAttribute("id").equals(id)) //$NON-NLS-1$
try {
- return (WizardFragment)cf[i].createExecutableExtension("class");
+ return (WizardFragment)cf[i].createExecutableExtension("class");
//$NON-NLS-1$
} catch( CoreException ce) {}
}
return null;
@@ -84,9 +94,9 @@
private Image image;
public ReferenceExtension(IConfigurationElement element) {
this.element = element;
- this.id = element.getAttribute("id");
- this.name = element.getAttribute("name");
- this.imageLoc = element.getAttribute("icon");
+ this.id = element.getAttribute("id"); //$NON-NLS-1$
+ this.name = element.getAttribute("name"); //$NON-NLS-1$
+ this.imageLoc = element.getAttribute("icon"); //$NON-NLS-1$
}
public String getId() { return this.id;}
public String getName() { return this.name; }
Deleted:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependenciesPropertyPage.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependenciesPropertyPage.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependenciesPropertyPage.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,52 +0,0 @@
-package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import
org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModelProvider;
-import
org.eclipse.jst.j2ee.application.internal.operations.RemoveComponentFromEnterpriseApplicationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
-import org.eclipse.jst.jee.project.facet.EarCreateDeploymentFilesDataModelProvider;
-import org.eclipse.jst.jee.project.facet.ICreateDeploymentFilesDataModelProperties;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-
-public class EarModuleDependenciesPropertyPage extends
- AddModuleDependenciesPropertiesPage {
- public EarModuleDependenciesPropertyPage(IProject project,
- ModuleAssemblyRootPage page) {
- super(project, page);
- }
-
- protected IDataModelOperation generateEARDDOperation() {
- IDataModel model = DataModelFactory.createDataModel(new
EarCreateDeploymentFilesDataModelProvider());
- model.setProperty(ICreateDeploymentFilesDataModelProperties.GENERATE_DD,
rootComponent);
- model.setProperty(ICreateDeploymentFilesDataModelProperties.TARGET_PROJECT, project);
- return model.getDefaultOperation();
- }
-
- public boolean postHandleChanges(IProgressMonitor monitor) {
- return true;
- }
-
- protected void handleRemoved(ArrayList<IVirtualComponent> removed) {
- super.handleRemoved(removed);
- J2EEComponentClasspathUpdater.getInstance().queueUpdateEAR(rootComponent.getProject());
- }
-
- protected IDataModelProvider getRemoveReferenceDataModelProvider(Object component) {
- return new RemoveComponentFromEnterpriseApplicationDataModelProvider();
- }
-
-// protected void postAddProjects(Set moduleProjects) throws CoreException {
-// EarFacetRuntimeHandler.updateModuleProjectRuntime(rootComponent.getProject(),
moduleProjects, new NullProgressMonitor());
-// }
-
- protected IDataModelProvider getAddReferenceDataModelProvider(IVirtualComponent
component) {
- return new AddComponentToEnterpriseApplicationDataModelProvider();
- }
-}
Deleted:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependencyPageProvider.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependencyPageProvider.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependencyPageProvider.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,29 +0,0 @@
-package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IDependencyPageProvider;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IModuleDependenciesControl;
-
-public class EarModuleDependencyPageProvider implements IDependencyPageProvider {
-
- public boolean canHandle(IFacetedProject project) {
- boolean isEAR =
project.hasProjectFacet(ProjectFacetsManager.getProjectFacet("jst.ear"));
//$NON-NLS-1$
- return isEAR;
- }
-
- public IModuleDependenciesControl[] createPages(IFacetedProject project,
- ModuleAssemblyRootPage parent) {
- return new IModuleDependenciesControl[] {
- new EarModuleDependenciesPropertyPage(project.getProject(), parent)
- };
- }
-
- public Composite createRootControl(IModuleDependenciesControl[] pages,
- Composite parent) {
- if( pages.length == 1 && pages[0] != null)
- return pages[0].createContents(parent);
- return null;
- }
-}
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ExternalJarReferenceWizardFragment.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ExternalJarReferenceWizardFragment.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ExternalJarReferenceWizardFragment.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
@@ -10,14 +20,14 @@
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
public class ExternalJarReferenceWizardFragment extends JarReferenceWizardFragment {
public Composite createComposite(Composite parent, IWizardHandle handle) {
Composite c = super.createComposite(parent, handle);
- handle.setTitle("Add an External Jar Reference");
- handle.setDescription("Here you can reference a filesystem Jar\n"
- + "This is not a suggested use-case, but is here for backwards
compatability.");
+ handle.setTitle(Messages.ExternalJarTitle);
+ handle.setDescription(Messages.ExternalJarDescription);
return c;
}
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/JarReferenceWizardFragment.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/JarReferenceWizardFragment.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/JarReferenceWizardFragment.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
@@ -24,6 +34,7 @@
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
@@ -41,10 +52,9 @@
public Composite createComposite(Composite parent, IWizardHandle handle) {
this.handle = handle;
- handle.setTitle("Add a Jar Reference");
- handle.setDescription("Here you can reference a workspace Jar\n"
- + "This is not a suggested use-case, but is here for backwards
compatability.");
-
+ handle.setTitle(Messages.JarTitle);
+ handle.setDescription(Messages.JarDescription);
+
Composite c = new Composite(parent, SWT.NONE);
c.setLayout(new FormLayout());
viewer = new TreeViewer(c, SWT.SINGLE | SWT.BORDER);
@@ -53,7 +63,7 @@
viewer.setInput(ResourcesPlugin.getWorkspace());
browse = new Button(c, SWT.NONE);
- browse.setText("Browse...");
+ browse.setText(Messages.Browse);
FormData fd = new FormData();
fd.left = new FormAttachment(0, 5);
fd.bottom = new FormAttachment(100, -5);
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ModuleAssemblyRootPage.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ModuleAssemblyRootPage.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ModuleAssemblyRootPage.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,15 +1,13 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*
http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial implementation as prop page heirarchy
- * rfrost(a)bea.com - conversion to single property page impl
- *******************************************************************************/
-
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import org.eclipse.core.resources.IProject;
@@ -24,13 +22,14 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.PropertyPage;
import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.common.componentcore.ui.propertypage.IDependencyPageProvider;
import org.eclipse.wst.common.componentcore.ui.propertypage.IModuleDependenciesControl;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
/**
- * Primary project property page for Module dependencies;
+ * Primary project property page for Module assembly;
*/
public class ModuleAssemblyRootPage extends PropertyPage {
@@ -42,12 +41,12 @@
}
private Composite getFacetErrorComposite(final Composite parent) {
- final String errorCheckingFacet = "Error Checking Project Facets";
+ final String errorCheckingFacet = Messages.ErrorCheckingFacets;
setErrorMessage(errorCheckingFacet);
return getErrorComposite(parent, errorCheckingFacet);
}
private Composite getVirtCompErrorComposite(final Composite parent) {
- final String errorCheckingFacet = "The given project is not a virtual component
project";
+ final String errorCheckingFacet = Messages.ErrorNotVirtualComponent;
setErrorMessage(errorCheckingFacet);
return getErrorComposite(parent, errorCheckingFacet);
}
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceRootWizardFragment.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceRootWizardFragment.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceRootWizardFragment.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
@@ -19,6 +29,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import
org.eclipse.wst.common.componentcore.ui.propertypage.internal.DependencyPageExtensionManager.ReferenceExtension;
public class NewReferenceRootWizardFragment extends WizardFragment {
@@ -32,8 +43,8 @@
public Composite createComposite(Composite parent, IWizardHandle wizard) {
this.wizard = wizard;
- wizard.setTitle("Select a reference type");
- wizard.setDescription("Here you can select one of many types of references to
add");
+ wizard.setTitle(Messages.NewReferenceTitle);
+ wizard.setDescription(Messages.NewReferenceDescription);
Composite c = new Composite(parent, SWT.NONE);
c.setLayout(new FillLayout());
viewer = new TreeViewer(c, SWT.SINGLE | SWT.BORDER);
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceWizard.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceWizard.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceWizard.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.List;
@@ -4,18 +14,19 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbench;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.server.ui.internal.wizard.TaskWizard;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
public class NewReferenceWizard extends TaskWizard {
- public static final String COMPONENT = "dependency.component";
- public static final String COMPONENT_PATH = "dependency.component.path";
- public static final String PROJECT = "root.project";
- public static final String ROOT_COMPONENT = "root.component";
+ public static final String COMPONENT = "dependency.component"; //$NON-NLS-1$
+ public static final String COMPONENT_PATH = "dependency.component.path";
//$NON-NLS-1$
+ public static final String PROJECT = "root.project"; //$NON-NLS-1$
+ public static final String ROOT_COMPONENT = "root.component"; //$NON-NLS-1$
public NewReferenceWizard() {
- super("New Reference Wizard", new WizardFragment() {
+ super(Messages.NewReferenceWizard, new WizardFragment() {
protected void createChildFragments(List<WizardFragment> list) {
list.add(new NewReferenceRootWizardFragment());
}
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ProjectReferenceWizardFragment.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ProjectReferenceWizardFragment.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ProjectReferenceWizardFragment.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
@@ -28,6 +38,7 @@
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
@@ -44,9 +55,8 @@
}
public Composite createComposite(Composite parent, IWizardHandle handle) {
- handle.setTitle("Add a Project Reference");
- handle.setDescription("Here you can make a project into a reference.\n" +
- "If the project is not already a flexible project, it will be converted into
one.");
+ handle.setTitle(Messages.ProjectReferenceTitle);
+ handle.setDescription(Messages.ProjectReferenceDescription);
Composite c = new Composite(parent, SWT.NONE);
c.setLayout(new FillLayout());
@@ -85,7 +95,7 @@
// TODO extension point? API? Something?!
//String extension = ComponentUtils.getDefaultProjectExtension(comp);
- path += ".jar"; //extension;
+ path += ".jar"; //extension; //$NON-NLS-1$
getTaskModel().putObject(NewReferenceWizard.COMPONENT, comp);
getTaskModel().putObject(NewReferenceWizard.COMPONENT_PATH, path);
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/VariableReferenceWizardFragment.java
===================================================================
---
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/VariableReferenceWizardFragment.java 2009-07-27
20:11:15 UTC (rev 16829)
+++
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/VariableReferenceWizardFragment.java 2009-07-27
21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
@@ -12,14 +22,14 @@
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
public class VariableReferenceWizardFragment extends JarReferenceWizardFragment {
public Composite createComposite(Composite parent, IWizardHandle handle) {
Composite c = super.createComposite(parent, handle);
- handle.setTitle("Add a Variable Reference");
- handle.setDescription("Here you can reference a variable which maps to a single
jar.\n"
- + "This is not a suggested use-case, but is here for backwards
compatability.");
+ handle.setTitle(Messages.VariableReferenceTitle);
+ handle.setDescription(Messages.VariableReferenceDescription);
return c;
}