You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ch...@apache.org on 2006/02/22 00:40:29 UTC

svn commit: r379627 [33/34] - in /incubator/servicemix/trunk: ./ etc/ sandbox/servicemix-wsn-1.2/src/sa/META-INF/ sandbox/servicemix-wsn-1.2/src/su/META-INF/ servicemix-assembly/ servicemix-assembly/src/main/assembly/ servicemix-assembly/src/main/relea...

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/ServiceUnitEditPolicy.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/ServiceUnitEditPolicy.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/ServiceUnitEditPolicy.java (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/ServiceUnitEditPolicy.java Tue Feb 21 15:40:05 2006
@@ -1,45 +1,45 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.packaging.parts;
-
-import org.apache.servicemix.packaging.model.AbstractComponent;
-import org.apache.servicemix.packaging.model.DeploymentDiagram;
-import org.apache.servicemix.packaging.model.ServiceAssembly;
-import org.apache.servicemix.packaging.model.ServiceUnit;
-import org.apache.servicemix.packaging.model.commands.ComponentDeleteCommand;
-import org.apache.servicemix.packaging.model.commands.ServiceUnitDeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.ComponentEditPolicy;
-import org.eclipse.gef.requests.GroupRequest;
-
-/**
- * The GEF edit policy for a Service Unit
- * 
- * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
- * 
- */
-public class ServiceUnitEditPolicy extends ComponentEditPolicy {
-
-	protected Command createDeleteCommand(GroupRequest deleteRequest) {
-		Object parent = getHost().getParent().getModel();
-		Object child = getHost().getModel();
-		if (parent instanceof ServiceAssembly && child instanceof ServiceUnit) {
-			return new ServiceUnitDeleteCommand((ServiceAssembly) parent,
-					(ServiceUnit) child);
-		}
-		return super.createDeleteCommand(deleteRequest);
-	}
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.packaging.parts;
+
+import org.apache.servicemix.packaging.model.AbstractComponent;
+import org.apache.servicemix.packaging.model.DeploymentDiagram;
+import org.apache.servicemix.packaging.model.ServiceAssembly;
+import org.apache.servicemix.packaging.model.ServiceUnit;
+import org.apache.servicemix.packaging.model.commands.ComponentDeleteCommand;
+import org.apache.servicemix.packaging.model.commands.ServiceUnitDeleteCommand;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.ComponentEditPolicy;
+import org.eclipse.gef.requests.GroupRequest;
+
+/**
+ * The GEF edit policy for a Service Unit
+ * 
+ * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
+ * 
+ */
+public class ServiceUnitEditPolicy extends ComponentEditPolicy {
+
+	protected Command createDeleteCommand(GroupRequest deleteRequest) {
+		Object parent = getHost().getParent().getModel();
+		Object child = getHost().getModel();
+		if (parent instanceof ServiceAssembly && child instanceof ServiceUnit) {
+			return new ServiceUnitDeleteCommand((ServiceAssembly) parent,
+					(ServiceUnit) child);
+		}
+		return super.createDeleteCommand(deleteRequest);
+	}
+}

Propchange: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/ServiceUnitEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/AssetDescriptorFactory.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/AssetDescriptorFactory.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/AssetDescriptorFactory.java (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/AssetDescriptorFactory.java Tue Feb 21 15:40:05 2006
@@ -1,82 +1,82 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.packaging.parts.descriptors;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.servicemix.descriptors.packaging.assets.Artifact;
-import org.apache.servicemix.descriptors.packaging.assets.Assets;
-import org.apache.servicemix.descriptors.packaging.assets.Connection;
-import org.apache.servicemix.descriptors.packaging.assets.Parameter;
-import org.apache.servicemix.packaging.parts.DeploymentDiagramEditPart;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-
-/**
- * A simple factory that can take the description of assets for a component and
- * generate the PropertyDescriptors for the GEF property pages
- * 
- * @author <a href="mailto:costello.tony@gmail.com">Tony Costello </a>
- * 
- */
-public class AssetDescriptorFactory {
-
-	private static final String PARA_TYPE_TEXT = "text";
-
-	public static Collection<? extends IPropertyDescriptor> getDescriptors(
-			Assets assets, DeploymentDiagramEditPart diagram) {
-		List<IPropertyDescriptor> descriptors = new ArrayList<IPropertyDescriptor>();
-
-		// Generate descriptors for parameters
-		for (Parameter parameter : assets.getParameter()) {
-			if (parameter.getType().equals(PARA_TYPE_TEXT)) {
-				TextPropertyDescriptor textProperty = new TextPropertyDescriptor(
-						parameter, parameter.getDescription());
-				textProperty.setCategory(parameter.getCategory());
-				descriptors.add(textProperty);
-			}
-		}
-
-		// Generate descriptors for connections
-		for (Connection connection : assets.getConnection()) {
-			if ("provides".equals(connection.getType())) {
-				QNamePropertyDescriptor qnameProperty = new QNamePropertyDescriptor(
-						connection, connection.getDescription(), null);
-				qnameProperty.setCategory(connection.getCategory());
-				descriptors.add(qnameProperty);
-			} else {
-				QNamePropertyDescriptor qnameProperty = new QNamePropertyDescriptor(
-						connection, connection.getDescription(), diagram);
-				qnameProperty.setCategory(connection.getCategory());
-				descriptors.add(qnameProperty);
-			}
-
-		}
-
-		// Generate descriptiors for artifacts
-		for (Artifact embeddedArtifact : assets.getArtifact()) {
-			EmbeddedArtifactDescriptor embeddedArtifactDescriptor = new EmbeddedArtifactDescriptor(
-					embeddedArtifact, embeddedArtifact.getDescription(),
-					diagram, embeddedArtifact.getExtension());
-			embeddedArtifact.setCategory(embeddedArtifact.getCategory());
-			descriptors.add(embeddedArtifactDescriptor);
-		}
-
-		return descriptors;
-	}
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.packaging.parts.descriptors;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.servicemix.descriptors.packaging.assets.Artifact;
+import org.apache.servicemix.descriptors.packaging.assets.Assets;
+import org.apache.servicemix.descriptors.packaging.assets.Connection;
+import org.apache.servicemix.descriptors.packaging.assets.Parameter;
+import org.apache.servicemix.packaging.parts.DeploymentDiagramEditPart;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+
+/**
+ * A simple factory that can take the description of assets for a component and
+ * generate the PropertyDescriptors for the GEF property pages
+ * 
+ * @author <a href="mailto:costello.tony@gmail.com">Tony Costello </a>
+ * 
+ */
+public class AssetDescriptorFactory {
+
+	private static final String PARA_TYPE_TEXT = "text";
+
+	public static Collection<? extends IPropertyDescriptor> getDescriptors(
+			Assets assets, DeploymentDiagramEditPart diagram) {
+		List<IPropertyDescriptor> descriptors = new ArrayList<IPropertyDescriptor>();
+
+		// Generate descriptors for parameters
+		for (Parameter parameter : assets.getParameter()) {
+			if (parameter.getType().equals(PARA_TYPE_TEXT)) {
+				TextPropertyDescriptor textProperty = new TextPropertyDescriptor(
+						parameter, parameter.getDescription());
+				textProperty.setCategory(parameter.getCategory());
+				descriptors.add(textProperty);
+			}
+		}
+
+		// Generate descriptors for connections
+		for (Connection connection : assets.getConnection()) {
+			if ("provides".equals(connection.getType())) {
+				QNamePropertyDescriptor qnameProperty = new QNamePropertyDescriptor(
+						connection, connection.getDescription(), null);
+				qnameProperty.setCategory(connection.getCategory());
+				descriptors.add(qnameProperty);
+			} else {
+				QNamePropertyDescriptor qnameProperty = new QNamePropertyDescriptor(
+						connection, connection.getDescription(), diagram);
+				qnameProperty.setCategory(connection.getCategory());
+				descriptors.add(qnameProperty);
+			}
+
+		}
+
+		// Generate descriptiors for artifacts
+		for (Artifact embeddedArtifact : assets.getArtifact()) {
+			EmbeddedArtifactDescriptor embeddedArtifactDescriptor = new EmbeddedArtifactDescriptor(
+					embeddedArtifact, embeddedArtifact.getDescription(),
+					diagram, embeddedArtifact.getExtension());
+			embeddedArtifact.setCategory(embeddedArtifact.getCategory());
+			descriptors.add(embeddedArtifactDescriptor);
+		}
+
+		return descriptors;
+	}
+}

Propchange: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/AssetDescriptorFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactCellEditor.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactCellEditor.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactCellEditor.java (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactCellEditor.java Tue Feb 21 15:40:05 2006
@@ -1,51 +1,51 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.packaging.parts.descriptors;
-
-import org.apache.servicemix.packaging.parts.DeploymentDiagramEditPart;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.DialogCellEditor;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * The cell editor for an embedded artifact
- * 
- * @author <a href="mailto:costello.tony@gmail.com">Tony Costello </a>
- * 
- */
-public class EmbeddedArtifactCellEditor extends DialogCellEditor {
-
-	private DeploymentDiagramEditPart model;
-
-	private String extension;
-
-	public EmbeddedArtifactCellEditor(DeploymentDiagramEditPart model,
-			String extension) {
-		super();
-		this.model = model;
-		this.extension = extension;
-	}
-
-	@Override
-	protected Object openDialogBox(Control arg0) {
-		EmbeddedArtifactSelectionDialog editDialog = new EmbeddedArtifactSelectionDialog(
-				arg0.getShell(), getValue(), model, extension);
-		if (editDialog.open() == IDialogConstants.OK_ID) {
-			return editDialog.getResource();
-		}
-		return null;
-	}	
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.packaging.parts.descriptors;
+
+import org.apache.servicemix.packaging.parts.DeploymentDiagramEditPart;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.DialogCellEditor;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * The cell editor for an embedded artifact
+ * 
+ * @author <a href="mailto:costello.tony@gmail.com">Tony Costello </a>
+ * 
+ */
+public class EmbeddedArtifactCellEditor extends DialogCellEditor {
+
+	private DeploymentDiagramEditPart model;
+
+	private String extension;
+
+	public EmbeddedArtifactCellEditor(DeploymentDiagramEditPart model,
+			String extension) {
+		super();
+		this.model = model;
+		this.extension = extension;
+	}
+
+	@Override
+	protected Object openDialogBox(Control arg0) {
+		EmbeddedArtifactSelectionDialog editDialog = new EmbeddedArtifactSelectionDialog(
+				arg0.getShell(), getValue(), model, extension);
+		if (editDialog.open() == IDialogConstants.OK_ID) {
+			return editDialog.getResource();
+		}
+		return null;
+	}	
+}

Propchange: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactCellEditor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactContentProvider.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactContentProvider.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactContentProvider.java (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactContentProvider.java Tue Feb 21 15:40:05 2006
@@ -1,105 +1,105 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.packaging.parts.descriptors;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.servicemix.packaging.parts.DeploymentDiagramEditPart;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * The content provider for an embedded artifact lookup
- * 
- * @author <a href="mailto:costello.tony@gmail.com">Tony Costello </a>
- * 
- */
-public class EmbeddedArtifactContentProvider implements
-		IStructuredContentProvider {
-
-	private String extension;
-
-	public EmbeddedArtifactContentProvider(String extension) {
-		this.extension = extension;
-	}
-
-	public Object[] getElements(Object arg0) {		
-		if (arg0 instanceof DeploymentDiagramEditPart) {
-			IProject project = ((DeploymentDiagramEditPart) arg0).getProject();
-			try {
-				List matchingResources = new ArrayList();
-				for (IResource resource : project.members()) {
-					matchingResources = internalFindByExtension(resource,
-							extension, matchingResources);
-				}				
-				return matchingResources.toArray();
-			} catch (Exception e) {
-				MessageDialog.openError(PlatformUI.getWorkbench()
-						.getActiveWorkbenchWindow().getShell(),
-						"Unable to list resources in " + project.getName(), e
-								.getMessage());
-			}
-
-		}
-		return new Object[] {};
-	}
-
-	/**
-	 * Used by the <code>findResourceByExtension</code> method to iterate
-	 * through the project resources looking for resources with a given
-	 * extension
-	 * 
-	 * @param resource
-	 *            The resource to check
-	 * @param extension
-	 *            The extension to look for
-	 * @return An array of the resources that match this extension
-	 * @throws CoreException
-	 */
-	private List internalFindByExtension(IResource resource, String extension,
-			List currentList) throws CoreException {
-		if (resource.isDerived())
-			return currentList;
-		if (resource instanceof IFolder) {
-			for (IResource folderChild : ((IFolder) resource).members()) {
-				currentList = internalFindByExtension(folderChild, extension,
-						currentList);
-			}
-			return currentList;
-		}
-		if (extension.equals(resource.getFileExtension())) {
-			currentList.add(resource);
-			return currentList;
-		} else
-			return currentList;
-	}
-
-	public void dispose() {
-		// Nothing to do
-	}
-
-	public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
-		// Nothing to do
-	}
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.packaging.parts.descriptors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.servicemix.packaging.parts.DeploymentDiagramEditPart;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The content provider for an embedded artifact lookup
+ * 
+ * @author <a href="mailto:costello.tony@gmail.com">Tony Costello </a>
+ * 
+ */
+public class EmbeddedArtifactContentProvider implements
+		IStructuredContentProvider {
+
+	private String extension;
+
+	public EmbeddedArtifactContentProvider(String extension) {
+		this.extension = extension;
+	}
+
+	public Object[] getElements(Object arg0) {		
+		if (arg0 instanceof DeploymentDiagramEditPart) {
+			IProject project = ((DeploymentDiagramEditPart) arg0).getProject();
+			try {
+				List matchingResources = new ArrayList();
+				for (IResource resource : project.members()) {
+					matchingResources = internalFindByExtension(resource,
+							extension, matchingResources);
+				}				
+				return matchingResources.toArray();
+			} catch (Exception e) {
+				MessageDialog.openError(PlatformUI.getWorkbench()
+						.getActiveWorkbenchWindow().getShell(),
+						"Unable to list resources in " + project.getName(), e
+								.getMessage());
+			}
+
+		}
+		return new Object[] {};
+	}
+
+	/**
+	 * Used by the <code>findResourceByExtension</code> method to iterate
+	 * through the project resources looking for resources with a given
+	 * extension
+	 * 
+	 * @param resource
+	 *            The resource to check
+	 * @param extension
+	 *            The extension to look for
+	 * @return An array of the resources that match this extension
+	 * @throws CoreException
+	 */
+	private List internalFindByExtension(IResource resource, String extension,
+			List currentList) throws CoreException {
+		if (resource.isDerived())
+			return currentList;
+		if (resource instanceof IFolder) {
+			for (IResource folderChild : ((IFolder) resource).members()) {
+				currentList = internalFindByExtension(folderChild, extension,
+						currentList);
+			}
+			return currentList;
+		}
+		if (extension.equals(resource.getFileExtension())) {
+			currentList.add(resource);
+			return currentList;
+		} else
+			return currentList;
+	}
+
+	public void dispose() {
+		// Nothing to do
+	}
+
+	public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
+		// Nothing to do
+	}
+
+}

Propchange: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactContentProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactDescriptor.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactDescriptor.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactDescriptor.java (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactDescriptor.java Tue Feb 21 15:40:05 2006
@@ -1,58 +1,58 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.packaging.parts.descriptors;
-
-import org.apache.servicemix.packaging.parts.DeploymentDiagramEditPart;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-/**
- * The property descriptor for an embedded artifact
- * 
- * @author <a href="mailto:costello.tony@gmail.com">Tony Costello </a>
- * 
- */
-public class EmbeddedArtifactDescriptor extends PropertyDescriptor {
-
-	private DeploymentDiagramEditPart model;
-
-	private String extension;
-
-	public EmbeddedArtifactDescriptor(Object property, String propertyName,
-			DeploymentDiagramEditPart diagramEditPart, String extension) {
-		super(property, propertyName);
-		if (diagramEditPart != null) {
-			this.model = diagramEditPart;
-		}
-		this.extension = extension;
-	}
-
-	@Override
-	public CellEditor createPropertyEditor(Composite arg0) {
-		EmbeddedArtifactCellEditor editor = new EmbeddedArtifactCellEditor(
-				model, extension);
-		editor.create(arg0);
-		return editor;
-	}
-
-	@Override
-	public ILabelProvider getLabelProvider() {
-		return new IResourceLabelProvider();
-	}
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.packaging.parts.descriptors;
+
+import org.apache.servicemix.packaging.parts.DeploymentDiagramEditPart;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.views.properties.PropertyDescriptor;
+
+/**
+ * The property descriptor for an embedded artifact
+ * 
+ * @author <a href="mailto:costello.tony@gmail.com">Tony Costello </a>
+ * 
+ */
+public class EmbeddedArtifactDescriptor extends PropertyDescriptor {
+
+	private DeploymentDiagramEditPart model;
+
+	private String extension;
+
+	public EmbeddedArtifactDescriptor(Object property, String propertyName,
+			DeploymentDiagramEditPart diagramEditPart, String extension) {
+		super(property, propertyName);
+		if (diagramEditPart != null) {
+			this.model = diagramEditPart;
+		}
+		this.extension = extension;
+	}
+
+	@Override
+	public CellEditor createPropertyEditor(Composite arg0) {
+		EmbeddedArtifactCellEditor editor = new EmbeddedArtifactCellEditor(
+				model, extension);
+		editor.create(arg0);
+		return editor;
+	}
+
+	@Override
+	public ILabelProvider getLabelProvider() {
+		return new IResourceLabelProvider();
+	}
+
+}

Propchange: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactSelectionDialog.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactSelectionDialog.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactSelectionDialog.java (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactSelectionDialog.java Tue Feb 21 15:40:05 2006
@@ -1,129 +1,129 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.packaging.parts.descriptors;
-
-import javax.xml.namespace.QName;
-
-import org.apache.servicemix.packaging.parts.DeploymentDiagramEditPart;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-
-/**
- * The selection dialog for an embedded artifact
- * 
- * @author <a href="mailto:costello.tony@gmail.com">Tony Costello </a>
- * 
- */
-public class EmbeddedArtifactSelectionDialog extends Dialog {
-
-	private DeploymentDiagramEditPart deploymentDiagram;
-
-	private String extension;
-
-	private QName qname;
-
-	private IResource resource;
-
-	private TableViewer viewer;
-
-	public EmbeddedArtifactSelectionDialog(Shell parentShell, Object object,
-			DeploymentDiagramEditPart model, String extension) {
-		super(parentShell);
-		this.deploymentDiagram = model;
-		this.extension = extension;
-	}
-
-	protected void createButtonsForButtonBar(Composite parent) {
-		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
-				true);
-		createButton(parent, IDialogConstants.CANCEL_ID,
-				IDialogConstants.CANCEL_LABEL, false);
-	}
-
-	protected Control createDialogArea(Composite parentComposite) {
-		Composite parent = (Composite) super.createDialogArea(parentComposite);
-		parent.setLayout(new GridLayout());
-		getShell().setText("Embedded Artifact");
-		Label descriptionLabel = new Label(parent, SWT.WRAP);
-		descriptionLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		descriptionLabel
-				.setText("An embedded artifact is a file resource you have within your project that you wish to make available to the JBI component or service unit.");
-
-		createEmbeddedArtifactTable(parent);
-
-		return parent;
-	}
-
-	private void createEmbeddedArtifactTable(Composite parent) {
-		Table table = new Table(parent, SWT.SINGLE | SWT.BORDER
-				| SWT.FULL_SELECTION);
-		table.setLinesVisible(false);
-		table.setHeaderVisible(false);
-		table.setLayoutData(new GridData(GridData.FILL_BOTH));
-		TableColumn column = new TableColumn(table, SWT.LEFT, 0);
-		column.setText("Property Name");
-		column.setWidth(600);
-
-		viewer = new TableViewer(table);
-		viewer
-				.setContentProvider(new EmbeddedArtifactContentProvider(
-						extension));
-		viewer.setLabelProvider(new IResourceLabelProvider());
-		viewer.setInput(deploymentDiagram);
-		viewer.refresh();
-	}
-
-	@Override
-	protected Point getInitialSize() {
-		if (deploymentDiagram == null)
-			return new Point(400, 220);
-		else
-			return new Point(400, 500);
-	}
-
-	@Override
-	protected void okPressed() {
-		if (viewer.getSelection() instanceof IStructuredSelection) {			
-			Object firstElement = ((IStructuredSelection) viewer.getSelection())
-					.getFirstElement();			
-			if (firstElement instanceof IResource) {
-				resource = (IResource) firstElement;
-			}
-		}
-		super.okPressed();
-	}
-
-	public IResource getResource() {
-		return resource;
-	}
-
-	public void setResource(IResource resource) {
-		this.resource = resource;
-	}
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.packaging.parts.descriptors;
+
+import javax.xml.namespace.QName;
+
+import org.apache.servicemix.packaging.parts.DeploymentDiagramEditPart;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+
+/**
+ * The selection dialog for an embedded artifact
+ * 
+ * @author <a href="mailto:costello.tony@gmail.com">Tony Costello </a>
+ * 
+ */
+public class EmbeddedArtifactSelectionDialog extends Dialog {
+
+	private DeploymentDiagramEditPart deploymentDiagram;
+
+	private String extension;
+
+	private QName qname;
+
+	private IResource resource;
+
+	private TableViewer viewer;
+
+	public EmbeddedArtifactSelectionDialog(Shell parentShell, Object object,
+			DeploymentDiagramEditPart model, String extension) {
+		super(parentShell);
+		this.deploymentDiagram = model;
+		this.extension = extension;
+	}
+
+	protected void createButtonsForButtonBar(Composite parent) {
+		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
+				true);
+		createButton(parent, IDialogConstants.CANCEL_ID,
+				IDialogConstants.CANCEL_LABEL, false);
+	}
+
+	protected Control createDialogArea(Composite parentComposite) {
+		Composite parent = (Composite) super.createDialogArea(parentComposite);
+		parent.setLayout(new GridLayout());
+		getShell().setText("Embedded Artifact");
+		Label descriptionLabel = new Label(parent, SWT.WRAP);
+		descriptionLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		descriptionLabel
+				.setText("An embedded artifact is a file resource you have within your project that you wish to make available to the JBI component or service unit.");
+
+		createEmbeddedArtifactTable(parent);
+
+		return parent;
+	}
+
+	private void createEmbeddedArtifactTable(Composite parent) {
+		Table table = new Table(parent, SWT.SINGLE | SWT.BORDER
+				| SWT.FULL_SELECTION);
+		table.setLinesVisible(false);
+		table.setHeaderVisible(false);
+		table.setLayoutData(new GridData(GridData.FILL_BOTH));
+		TableColumn column = new TableColumn(table, SWT.LEFT, 0);
+		column.setText("Property Name");
+		column.setWidth(600);
+
+		viewer = new TableViewer(table);
+		viewer
+				.setContentProvider(new EmbeddedArtifactContentProvider(
+						extension));
+		viewer.setLabelProvider(new IResourceLabelProvider());
+		viewer.setInput(deploymentDiagram);
+		viewer.refresh();
+	}
+
+	@Override
+	protected Point getInitialSize() {
+		if (deploymentDiagram == null)
+			return new Point(400, 220);
+		else
+			return new Point(400, 500);
+	}
+
+	@Override
+	protected void okPressed() {
+		if (viewer.getSelection() instanceof IStructuredSelection) {			
+			Object firstElement = ((IStructuredSelection) viewer.getSelection())
+					.getFirstElement();			
+			if (firstElement instanceof IResource) {
+				resource = (IResource) firstElement;
+			}
+		}
+		super.okPressed();
+	}
+
+	public IResource getResource() {
+		return resource;
+	}
+
+	public void setResource(IResource resource) {
+		this.resource = resource;
+	}
+}

Propchange: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/EmbeddedArtifactSelectionDialog.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/IResourceLabelProvider.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/IResourceLabelProvider.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/IResourceLabelProvider.java (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/IResourceLabelProvider.java Tue Feb 21 15:40:05 2006
@@ -1,38 +1,38 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.packaging.parts.descriptors;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-public class IResourceLabelProvider extends LabelProvider implements
-		ITableLabelProvider {
-
-	public Image getColumnImage(Object arg0, int arg1) {
-		return null;
-	}
-
-	public String getColumnText(Object arg0, int arg1) {
-		if (arg0 instanceof IResource) {
-			IResource resource = (IResource) arg0;
-			return resource.getProjectRelativePath().toOSString();
-		}
-		return arg0.toString();
-	}
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.packaging.parts.descriptors;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+public class IResourceLabelProvider extends LabelProvider implements
+		ITableLabelProvider {
+
+	public Image getColumnImage(Object arg0, int arg1) {
+		return null;
+	}
+
+	public String getColumnText(Object arg0, int arg1) {
+		if (arg0 instanceof IResource) {
+			IResource resource = (IResource) arg0;
+			return resource.getProjectRelativePath().toOSString();
+		}
+		return arg0.toString();
+	}
+
+}

Propchange: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/IResourceLabelProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameCellEditor.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameCellEditor.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameCellEditor.java (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameCellEditor.java Tue Feb 21 15:40:05 2006
@@ -1,57 +1,57 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.packaging.parts.descriptors;
-
-import org.apache.servicemix.packaging.model.DeploymentDiagram;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.DialogCellEditor;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * The property descriptor cell editor for an XML Qualified Name (QName)
- * 
- * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
- * 
- */
-public class QNameCellEditor extends DialogCellEditor {
-
-	private DeploymentDiagram model;
-
-	public QNameCellEditor(DeploymentDiagram model) {
-		super();
-		this.model = model;
-	}
-
-	@Override
-	protected Object openDialogBox(Control arg0) {
-		if (model == null) {
-			QNameEditDialog editDialog = new QNameEditDialog(arg0.getShell(),
-					getValue());
-			if (editDialog.open() == IDialogConstants.OK_ID) {
-				return editDialog.getQName();
-			} else
-				return null;
-		} else {
-			QNameFromDeploymentEditDialog editDialog = new QNameFromDeploymentEditDialog(
-					arg0.getShell(), getValue(), model);
-			if (editDialog.open() == IDialogConstants.OK_ID) {
-				return editDialog.getQName();
-			} else
-				return null;
-		}
-
-	}
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.packaging.parts.descriptors;
+
+import org.apache.servicemix.packaging.model.DeploymentDiagram;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.DialogCellEditor;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * The property descriptor cell editor for an XML Qualified Name (QName)
+ * 
+ * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
+ * 
+ */
+public class QNameCellEditor extends DialogCellEditor {
+
+	private DeploymentDiagram model;
+
+	public QNameCellEditor(DeploymentDiagram model) {
+		super();
+		this.model = model;
+	}
+
+	@Override
+	protected Object openDialogBox(Control arg0) {
+		if (model == null) {
+			QNameEditDialog editDialog = new QNameEditDialog(arg0.getShell(),
+					getValue());
+			if (editDialog.open() == IDialogConstants.OK_ID) {
+				return editDialog.getQName();
+			} else
+				return null;
+		} else {
+			QNameFromDeploymentEditDialog editDialog = new QNameFromDeploymentEditDialog(
+					arg0.getShell(), getValue(), model);
+			if (editDialog.open() == IDialogConstants.OK_ID) {
+				return editDialog.getQName();
+			} else
+				return null;
+		}
+
+	}
+}

Propchange: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameCellEditor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameEditDialog.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameEditDialog.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameEditDialog.java (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameEditDialog.java Tue Feb 21 15:40:05 2006
@@ -1,105 +1,105 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.packaging.parts.descriptors;
-
-import javax.xml.namespace.QName;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * The dialog for editting an XML Qualified Name (QName)
- * 
- * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
- * 
- */
-public class QNameEditDialog extends Dialog {
-
-	private QName qname = new QName("http://www.openuri.org","newService");
-
-	private Text localPart;
-
-	private Text namespaceUri;
-
-	private TableViewer viewer;
-
-	public QNameEditDialog(Shell parentShell, Object object) {
-		super(parentShell);
-		if (object instanceof QName)
-			this.qname = (QName) object;
-	}
-
-	@Override
-	protected void okPressed() {
-		qname = new QName(namespaceUri.getText(), localPart.getText());
-		super.okPressed();
-	}
-
-	protected void createButtonsForButtonBar(Composite parent) {
-		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
-				true);
-		createButton(parent, IDialogConstants.CANCEL_ID,
-				IDialogConstants.CANCEL_LABEL, false);
-	}
-
-	protected Control createDialogArea(Composite parentComposite) {
-		Composite parent = (Composite) super.createDialogArea(parentComposite);
-		parent.setLayout(new GridLayout());
-		getShell().setText("Service Name");
-		Label descriptionLabel = new Label(parent, SWT.WRAP);
-		descriptionLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		descriptionLabel
-				.setText("A service name is an XML qualified name and requires that both the local name and namespace are defined.");
-
-		Label localPartLabel = new Label(parent, SWT.WRAP);
-		localPartLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		localPartLabel.setText("Local part");
-
-		localPart = new Text(parent, SWT.BORDER);
-		localPart.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-		Label namespaceUriLabel = new Label(parent, SWT.WRAP);
-		namespaceUriLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		namespaceUriLabel.setText("Namespace URI");
-		namespaceUri = new Text(parent, SWT.BORDER);
-		namespaceUri.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-		// initialize values
-		localPart.setText(qname.getLocalPart());
-		namespaceUri.setText(qname.getNamespaceURI());
-
-		return parent;
-	}
-
-	@Override
-	protected Point getInitialSize() {
-		return new Point(400, 220);
-	}
-
-	public Object getQName() {
-		return qname;
-	}
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.packaging.parts.descriptors;
+
+import javax.xml.namespace.QName;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * The dialog for editting an XML Qualified Name (QName)
+ * 
+ * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
+ * 
+ */
+public class QNameEditDialog extends Dialog {
+
+	private QName qname = new QName("http://www.openuri.org","newService");
+
+	private Text localPart;
+
+	private Text namespaceUri;
+
+	private TableViewer viewer;
+
+	public QNameEditDialog(Shell parentShell, Object object) {
+		super(parentShell);
+		if (object instanceof QName)
+			this.qname = (QName) object;
+	}
+
+	@Override
+	protected void okPressed() {
+		qname = new QName(namespaceUri.getText(), localPart.getText());
+		super.okPressed();
+	}
+
+	protected void createButtonsForButtonBar(Composite parent) {
+		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
+				true);
+		createButton(parent, IDialogConstants.CANCEL_ID,
+				IDialogConstants.CANCEL_LABEL, false);
+	}
+
+	protected Control createDialogArea(Composite parentComposite) {
+		Composite parent = (Composite) super.createDialogArea(parentComposite);
+		parent.setLayout(new GridLayout());
+		getShell().setText("Service Name");
+		Label descriptionLabel = new Label(parent, SWT.WRAP);
+		descriptionLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		descriptionLabel
+				.setText("A service name is an XML qualified name and requires that both the local name and namespace are defined.");
+
+		Label localPartLabel = new Label(parent, SWT.WRAP);
+		localPartLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		localPartLabel.setText("Local part");
+
+		localPart = new Text(parent, SWT.BORDER);
+		localPart.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+		Label namespaceUriLabel = new Label(parent, SWT.WRAP);
+		namespaceUriLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		namespaceUriLabel.setText("Namespace URI");
+		namespaceUri = new Text(parent, SWT.BORDER);
+		namespaceUri.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+		// initialize values
+		localPart.setText(qname.getLocalPart());
+		namespaceUri.setText(qname.getNamespaceURI());
+
+		return parent;
+	}
+
+	@Override
+	protected Point getInitialSize() {
+		return new Point(400, 220);
+	}
+
+	public Object getQName() {
+		return qname;
+	}
+}

Propchange: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameEditDialog.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameFromDeploymentEditDialog.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameFromDeploymentEditDialog.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameFromDeploymentEditDialog.java (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameFromDeploymentEditDialog.java Tue Feb 21 15:40:05 2006
@@ -1,118 +1,118 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.packaging.parts.descriptors;
-
-import javax.xml.namespace.QName;
-
-import org.apache.servicemix.packaging.model.DeploymentDiagram;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-
-/**
- * The Dialog for selecting a QName from a deployment diagram
- * 
- * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
- * 
- */
-public class QNameFromDeploymentEditDialog extends Dialog {
-
-	private DeploymentDiagram deploymentDiagram;
-
-	private TableViewer viewer;
-
-	private QName qname;
-
-	public QNameFromDeploymentEditDialog(Shell parentShell, Object object,
-			DeploymentDiagram model) {
-		super(parentShell);
-		this.deploymentDiagram = model;
-	}
-
-	@Override
-	protected void okPressed() {
-		if (viewer.getSelection() instanceof IStructuredSelection) {
-			Object firstElement = ((IStructuredSelection) viewer.getSelection())
-					.getFirstElement();
-			if (firstElement instanceof QName) {
-				QName newQname = (QName) firstElement;
-				qname = newQname;
-			}
-		}
-		super.okPressed();
-	}
-
-	protected void createButtonsForButtonBar(Composite parent) {
-		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
-				true);
-		createButton(parent, IDialogConstants.CANCEL_ID,
-				IDialogConstants.CANCEL_LABEL, false);
-	}
-
-	protected Control createDialogArea(Composite parentComposite) {
-		Composite parent = (Composite) super.createDialogArea(parentComposite);
-		parent.setLayout(new GridLayout());
-		getShell().setText("Service Name");
-		Label descriptionLabel = new Label(parent, SWT.WRAP);
-		descriptionLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		descriptionLabel
-				.setText("A service name is an XML qualified name and requires that both the local name and namespace are defined.");
-
-		createServiceNameTable(parent);
-
-		return parent;
-	}
-
-	private void createServiceNameTable(Composite parent) {
-		Table table = new Table(parent, SWT.SINGLE | SWT.BORDER
-				| SWT.FULL_SELECTION);
-		table.setLinesVisible(false);
-		table.setHeaderVisible(false);
-		table.setLayoutData(new GridData(GridData.FILL_BOTH));
-		TableColumn column = new TableColumn(table, SWT.LEFT, 0);
-		column.setText("Property Name");
-		column.setWidth(600);
-
-		viewer = new TableViewer(table);
-		viewer.setContentProvider(new ServiceNameContentProvider());
-		viewer.setLabelProvider(new ServiceNameLabelProvider());
-		viewer.setInput(deploymentDiagram);
-		viewer.refresh();
-	}
-
-	@Override
-	protected Point getInitialSize() {
-		if (deploymentDiagram == null)
-			return new Point(400, 220);
-		else
-			return new Point(400, 500);
-	}
-
-	public Object getQName() {
-		return qname;
-	}
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.packaging.parts.descriptors;
+
+import javax.xml.namespace.QName;
+
+import org.apache.servicemix.packaging.model.DeploymentDiagram;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+
+/**
+ * The Dialog for selecting a QName from a deployment diagram
+ * 
+ * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
+ * 
+ */
+public class QNameFromDeploymentEditDialog extends Dialog {
+
+	private DeploymentDiagram deploymentDiagram;
+
+	private TableViewer viewer;
+
+	private QName qname;
+
+	public QNameFromDeploymentEditDialog(Shell parentShell, Object object,
+			DeploymentDiagram model) {
+		super(parentShell);
+		this.deploymentDiagram = model;
+	}
+
+	@Override
+	protected void okPressed() {
+		if (viewer.getSelection() instanceof IStructuredSelection) {
+			Object firstElement = ((IStructuredSelection) viewer.getSelection())
+					.getFirstElement();
+			if (firstElement instanceof QName) {
+				QName newQname = (QName) firstElement;
+				qname = newQname;
+			}
+		}
+		super.okPressed();
+	}
+
+	protected void createButtonsForButtonBar(Composite parent) {
+		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
+				true);
+		createButton(parent, IDialogConstants.CANCEL_ID,
+				IDialogConstants.CANCEL_LABEL, false);
+	}
+
+	protected Control createDialogArea(Composite parentComposite) {
+		Composite parent = (Composite) super.createDialogArea(parentComposite);
+		parent.setLayout(new GridLayout());
+		getShell().setText("Service Name");
+		Label descriptionLabel = new Label(parent, SWT.WRAP);
+		descriptionLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		descriptionLabel
+				.setText("A service name is an XML qualified name and requires that both the local name and namespace are defined.");
+
+		createServiceNameTable(parent);
+
+		return parent;
+	}
+
+	private void createServiceNameTable(Composite parent) {
+		Table table = new Table(parent, SWT.SINGLE | SWT.BORDER
+				| SWT.FULL_SELECTION);
+		table.setLinesVisible(false);
+		table.setHeaderVisible(false);
+		table.setLayoutData(new GridData(GridData.FILL_BOTH));
+		TableColumn column = new TableColumn(table, SWT.LEFT, 0);
+		column.setText("Property Name");
+		column.setWidth(600);
+
+		viewer = new TableViewer(table);
+		viewer.setContentProvider(new ServiceNameContentProvider());
+		viewer.setLabelProvider(new ServiceNameLabelProvider());
+		viewer.setInput(deploymentDiagram);
+		viewer.refresh();
+	}
+
+	@Override
+	protected Point getInitialSize() {
+		if (deploymentDiagram == null)
+			return new Point(400, 220);
+		else
+			return new Point(400, 500);
+	}
+
+	public Object getQName() {
+		return qname;
+	}
+}

Propchange: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNameFromDeploymentEditDialog.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNamePropertyDescriptor.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNamePropertyDescriptor.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNamePropertyDescriptor.java (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNamePropertyDescriptor.java Tue Feb 21 15:40:05 2006
@@ -1,49 +1,49 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.packaging.parts.descriptors;
-
-import org.apache.servicemix.packaging.model.DeploymentDiagram;
-import org.apache.servicemix.packaging.parts.DeploymentDiagramEditPart;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-/**
- * The GEF property descriptor for an XML Qualified Name (QName)
- * 
- * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
- * 
- */
-public class QNamePropertyDescriptor extends PropertyDescriptor {
-
-	private DeploymentDiagram model;
-
-	public QNamePropertyDescriptor(Object property, String propertyName,
-			DeploymentDiagramEditPart diagramEditPart) {
-		super(property, propertyName);
-		if (diagramEditPart != null) {
-			this.model = (DeploymentDiagram) diagramEditPart.getModel();
-		}
-	}
-
-	@Override
-	public CellEditor createPropertyEditor(Composite arg0) {
-		QNameCellEditor editor = new QNameCellEditor(model);
-		editor.create(arg0);
-		return editor;
-	}
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.packaging.parts.descriptors;
+
+import org.apache.servicemix.packaging.model.DeploymentDiagram;
+import org.apache.servicemix.packaging.parts.DeploymentDiagramEditPart;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.views.properties.PropertyDescriptor;
+
+/**
+ * The GEF property descriptor for an XML Qualified Name (QName)
+ * 
+ * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
+ * 
+ */
+public class QNamePropertyDescriptor extends PropertyDescriptor {
+
+	private DeploymentDiagram model;
+
+	public QNamePropertyDescriptor(Object property, String propertyName,
+			DeploymentDiagramEditPart diagramEditPart) {
+		super(property, propertyName);
+		if (diagramEditPart != null) {
+			this.model = (DeploymentDiagram) diagramEditPart.getModel();
+		}
+	}
+
+	@Override
+	public CellEditor createPropertyEditor(Composite arg0) {
+		QNameCellEditor editor = new QNameCellEditor(model);
+		editor.create(arg0);
+		return editor;
+	}
+
+}

Propchange: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/QNamePropertyDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameContentProvider.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameContentProvider.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameContentProvider.java (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameContentProvider.java Tue Feb 21 15:40:05 2006
@@ -1,45 +1,45 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.packaging.parts.descriptors;
-
-import org.apache.servicemix.packaging.model.DeploymentDiagram;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * The content provider for a list of service names from a deployment diagram
- * 
- * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
- * 
- */
-public class ServiceNameContentProvider implements IStructuredContentProvider {
-
-	public Object[] getElements(Object arg0) {
-		if (arg0 instanceof DeploymentDiagram)
-			return ServiceNameHelper.getServiceNames((DeploymentDiagram) arg0)
-					.toArray();
-		return new Object[] {};
-	}
-
-	public void dispose() {
-		// Nothing to do
-	}
-
-	public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
-		// Nothing to do
-	}
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.packaging.parts.descriptors;
+
+import org.apache.servicemix.packaging.model.DeploymentDiagram;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * The content provider for a list of service names from a deployment diagram
+ * 
+ * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
+ * 
+ */
+public class ServiceNameContentProvider implements IStructuredContentProvider {
+
+	public Object[] getElements(Object arg0) {
+		if (arg0 instanceof DeploymentDiagram)
+			return ServiceNameHelper.getServiceNames((DeploymentDiagram) arg0)
+					.toArray();
+		return new Object[] {};
+	}
+
+	public void dispose() {
+		// Nothing to do
+	}
+
+	public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
+		// Nothing to do
+	}
+
+}

Propchange: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameContentProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameHelper.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameHelper.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameHelper.java (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameHelper.java Tue Feb 21 15:40:05 2006
@@ -1,93 +1,93 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.packaging.parts.descriptors;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.apache.servicemix.packaging.model.AbstractComponent;
-import org.apache.servicemix.packaging.model.AbstractConnectableService;
-import org.apache.servicemix.packaging.model.DeploymentDiagram;
-import org.apache.servicemix.packaging.model.ServiceAssembly;
-import org.apache.servicemix.packaging.model.ServiceUnit;
-
-/**
- * A helper class for handling Service Names in deployment diagrams
- * 
- * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
- * 
- */
-public class ServiceNameHelper {
-
-	public static List<QName> getServiceNames(DeploymentDiagram diagram) {
-		List<QName> serviceNames = new LinkedList<QName>();
-
-		if (diagram != null) {
-			for (AbstractComponent child : diagram.getChildren()) {
-				if (child instanceof ServiceAssembly) {
-					for (ServiceUnit unit : ((ServiceAssembly) child)
-							.getServiceUnit()) {
-						if (unit.getServiceName() != null)
-							serviceNames.add(unit.getServiceName());
-					}
-				} else if (child instanceof AbstractConnectableService) {
-					if (((AbstractConnectableService) child).getServiceName() != null)
-						serviceNames.add(((AbstractConnectableService) child)
-								.getServiceName());
-				}
-			}
-		}
-		return serviceNames;
-	}
-
-	public static QName getUniqueServiceName(DeploymentDiagram diagram) {
-		List<QName> serviceNames = getServiceNames(diagram);
-		QName newName = null;
-		int count = 1;
-		while (newName == null) {
-			QName testName = new QName("http://openuri.org", "newService"
-					+ count);
-			if (!serviceNames.contains(testName)) {
-				newName = testName;
-			}
-			count++;
-		}
-		return newName;
-	}
-
-	public static AbstractConnectableService getConnectableByQName(
-			DeploymentDiagram diagram, QName qname) {
-		if (diagram != null) {
-			for (AbstractComponent child : diagram.getChildren()) {
-				if (child instanceof ServiceAssembly) {
-					for (ServiceUnit unit : ((ServiceAssembly) child)
-							.getServiceUnit()) {
-						if (qname.equals(unit.getServiceName()))
-							return unit;
-					}
-				} else if (child instanceof AbstractConnectableService) {
-					if (qname.equals(((AbstractConnectableService) child)
-							.getServiceName())) {
-						return (AbstractConnectableService) child;
-					}
-				}
-			}
-		}
-		return null;
-	}
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.packaging.parts.descriptors;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.servicemix.packaging.model.AbstractComponent;
+import org.apache.servicemix.packaging.model.AbstractConnectableService;
+import org.apache.servicemix.packaging.model.DeploymentDiagram;
+import org.apache.servicemix.packaging.model.ServiceAssembly;
+import org.apache.servicemix.packaging.model.ServiceUnit;
+
+/**
+ * A helper class for handling Service Names in deployment diagrams
+ * 
+ * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
+ * 
+ */
+public class ServiceNameHelper {
+
+	public static List<QName> getServiceNames(DeploymentDiagram diagram) {
+		List<QName> serviceNames = new LinkedList<QName>();
+
+		if (diagram != null) {
+			for (AbstractComponent child : diagram.getChildren()) {
+				if (child instanceof ServiceAssembly) {
+					for (ServiceUnit unit : ((ServiceAssembly) child)
+							.getServiceUnit()) {
+						if (unit.getServiceName() != null)
+							serviceNames.add(unit.getServiceName());
+					}
+				} else if (child instanceof AbstractConnectableService) {
+					if (((AbstractConnectableService) child).getServiceName() != null)
+						serviceNames.add(((AbstractConnectableService) child)
+								.getServiceName());
+				}
+			}
+		}
+		return serviceNames;
+	}
+
+	public static QName getUniqueServiceName(DeploymentDiagram diagram) {
+		List<QName> serviceNames = getServiceNames(diagram);
+		QName newName = null;
+		int count = 1;
+		while (newName == null) {
+			QName testName = new QName("http://openuri.org", "newService"
+					+ count);
+			if (!serviceNames.contains(testName)) {
+				newName = testName;
+			}
+			count++;
+		}
+		return newName;
+	}
+
+	public static AbstractConnectableService getConnectableByQName(
+			DeploymentDiagram diagram, QName qname) {
+		if (diagram != null) {
+			for (AbstractComponent child : diagram.getChildren()) {
+				if (child instanceof ServiceAssembly) {
+					for (ServiceUnit unit : ((ServiceAssembly) child)
+							.getServiceUnit()) {
+						if (qname.equals(unit.getServiceName()))
+							return unit;
+					}
+				} else if (child instanceof AbstractConnectableService) {
+					if (qname.equals(((AbstractConnectableService) child)
+							.getServiceName())) {
+						return (AbstractConnectableService) child;
+					}
+				}
+			}
+		}
+		return null;
+	}
+}

Propchange: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameLabelProvider.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameLabelProvider.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameLabelProvider.java (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameLabelProvider.java Tue Feb 21 15:40:05 2006
@@ -1,48 +1,48 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.packaging.parts.descriptors;
-
-import javax.xml.namespace.QName;
-
-import org.apache.servicemix.packaging.model.AbstractConnectableService;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Label Provider for Service Names
- * 
- * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
- * 
- */
-public class ServiceNameLabelProvider extends LabelProvider implements
-		ITableLabelProvider {
-
-	public Image getColumnImage(Object arg0, int arg1) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	public String getColumnText(Object arg0, int arg1) {
-		if (arg0 instanceof AbstractConnectableService)
-			return ((AbstractConnectableService) arg0).getServiceName()
-					.toString();
-		if (arg0 instanceof QName)
-			return ((QName) arg0).toString();
-		return null;
-	}
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.packaging.parts.descriptors;
+
+import javax.xml.namespace.QName;
+
+import org.apache.servicemix.packaging.model.AbstractConnectableService;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * Label Provider for Service Names
+ * 
+ * @author <a href="mailto:philip.dodds@gmail.com">Philip Dodds </a>
+ * 
+ */
+public class ServiceNameLabelProvider extends LabelProvider implements
+		ITableLabelProvider {
+
+	public Image getColumnImage(Object arg0, int arg1) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getColumnText(Object arg0, int arg1) {
+		if (arg0 instanceof AbstractConnectableService)
+			return ((AbstractConnectableService) arg0).getServiceName()
+					.toString();
+		if (arg0 instanceof QName)
+			return ((QName) arg0).toString();
+		return null;
+	}
+
+}

Propchange: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/java/org/apache/servicemix/packaging/parts/descriptors/ServiceNameLabelProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native