-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.project.internal;\r
-\r
-import java.util.Collection;\r
-import java.util.Collections;\r
-\r
-import org.eclipse.core.runtime.CoreException;\r
-import org.eclipse.core.runtime.IConfigurationElement;\r
-import org.simantics.project.features.IProjectFeature;\r
-import org.simantics.project.features.registry.GroupReference;\r
-import org.simantics.project.features.registry.IProjectFeatureExtension;\r
-import org.simantics.project.features.registry.InjectedDependency;\r
-import org.simantics.project.features.registry.ProjectFeatureReference;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-class ProjectFeatureExtension implements IProjectFeatureExtension {\r
-\r
- // For access to createExecutableExtension(String).\r
- private final IConfigurationElement configurationElement;\r
-\r
- private final String id;\r
- private final String label;\r
- private final String description;\r
- private final boolean published;\r
-\r
- private final Collection<ProjectFeatureReference> requires;\r
- private final Collection<GroupReference> installGroups;\r
- private final Collection<InjectedDependency> injections;\r
-\r
- public ProjectFeatureExtension(IConfigurationElement ce, String id, String label, String description,\r
- boolean published, Collection<ProjectFeatureReference> requires, Collection<InjectedDependency> injections,\r
- Collection<GroupReference> installGroups) {\r
- this.configurationElement = ce;\r
- this.id = id;\r
- this.label = label;\r
- this.description = description;\r
- this.published = published;\r
- this.requires = Collections.unmodifiableCollection(requires);\r
- this.injections = Collections.unmodifiableCollection(injections);\r
- this.installGroups = Collections.unmodifiableCollection(installGroups);\r
- }\r
-\r
- @Override\r
- public String getId() {\r
- return id;\r
- }\r
-\r
- @Override\r
- public String getLabel() {\r
- return label;\r
- }\r
-\r
- @Override\r
- public String getDescription() {\r
- return description;\r
- }\r
-\r
- @Override\r
- public boolean isPublished() {\r
- return published;\r
- }\r
-\r
- @Override\r
- public Collection<ProjectFeatureReference> requires() {\r
- return requires;\r
- }\r
-\r
- public Collection<InjectedDependency> injections() {\r
- return injections;\r
- }\r
-\r
- @Override\r
- public Collection<GroupReference> installGroups() {\r
- return installGroups;\r
- }\r
-\r
- @Override\r
- public IProjectFeature newInstance() throws CoreException {\r
- return (IProjectFeature) configurationElement.createExecutableExtension("class");\r
- }\r
-\r
- @Override\r
- public String toString() {\r
- return super.toString() + " [id=" + id + ", label=" + label + ", description=" + description + ", published=" + published + ", requires=" + requires + ", injections=" + injections + ", usedWithGroups=" + installGroups + "]";\r
- }\r
-\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * 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:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.project.internal;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.simantics.project.features.IProjectFeature;
+import org.simantics.project.features.registry.GroupReference;
+import org.simantics.project.features.registry.IProjectFeatureExtension;
+import org.simantics.project.features.registry.InjectedDependency;
+import org.simantics.project.features.registry.ProjectFeatureReference;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+class ProjectFeatureExtension implements IProjectFeatureExtension {
+
+ // For access to createExecutableExtension(String).
+ private final IConfigurationElement configurationElement;
+
+ private final String id;
+ private final String label;
+ private final String description;
+ private final boolean published;
+
+ private final Collection<ProjectFeatureReference> requires;
+ private final Collection<GroupReference> installGroups;
+ private final Collection<InjectedDependency> injections;
+
+ public ProjectFeatureExtension(IConfigurationElement ce, String id, String label, String description,
+ boolean published, Collection<ProjectFeatureReference> requires, Collection<InjectedDependency> injections,
+ Collection<GroupReference> installGroups) {
+ this.configurationElement = ce;
+ this.id = id;
+ this.label = label;
+ this.description = description;
+ this.published = published;
+ this.requires = Collections.unmodifiableCollection(requires);
+ this.injections = Collections.unmodifiableCollection(injections);
+ this.installGroups = Collections.unmodifiableCollection(installGroups);
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ @Override
+ public String getDescription() {
+ return description;
+ }
+
+ @Override
+ public boolean isPublished() {
+ return published;
+ }
+
+ @Override
+ public Collection<ProjectFeatureReference> requires() {
+ return requires;
+ }
+
+ public Collection<InjectedDependency> injections() {
+ return injections;
+ }
+
+ @Override
+ public Collection<GroupReference> installGroups() {
+ return installGroups;
+ }
+
+ @Override
+ public IProjectFeature newInstance() throws CoreException {
+ return (IProjectFeature) configurationElement.createExecutableExtension("class");
+ }
+
+ @Override
+ public String toString() {
+ return super.toString() + " [id=" + id + ", label=" + label + ", description=" + description + ", published=" + published + ", requires=" + requires + ", injections=" + injections + ", usedWithGroups=" + installGroups + "]";
+ }
+
}
\ No newline at end of file