Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.ui')
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IResolutionErrorReportingPage.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ProfileModificationAction.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/UpdateAction.java58
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AcceptLicensesWizardPage.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/InstallWizard.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/PreselectedIUInstallWizard.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UninstallWizard.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UpdateWizard.java77
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/IUElementListRoot.java (renamed from bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java)4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/PlannerResolutionOperation.java5
22 files changed, 124 insertions, 78 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java
index 1e0a8b690..49563868e 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java
@@ -62,6 +62,7 @@ public class ProvUIMessages extends NLS {
public static String IULicensePropertyPage_ViewLicenseLabel;
public static String ProfileChangeRequestBuildingRequest;
public static String ProfileElement_InvalidProfile;
+ public static String ProfileModificationAction_InvalidSelections;
public static String ProfileModificationAction_NoChangeRequestProvided;
public static String ProfileModificationAction_NoExplanationProvided;
public static String ProfileModificationAction_ResolutionOperationLabel;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IResolutionErrorReportingPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IResolutionErrorReportingPage.java
index 69d7c04ba..1646cea01 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IResolutionErrorReportingPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IResolutionErrorReportingPage.java
@@ -11,7 +11,8 @@
package org.eclipse.equinox.internal.p2.ui.dialogs;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+
import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
/**
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java
index eb94f8375..5b3ee78e1 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java
@@ -10,8 +10,9 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
index 51dbc4f9f..87a95d855 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -16,12 +16,11 @@ import java.util.HashSet;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.ui.*;
import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.internal.provisional.p2.ui.*;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
import org.eclipse.jface.operation.IRunnableContext;
@@ -119,6 +118,9 @@ public abstract class ProvisioningOperationWizard extends Wizard {
root = makeResolutionElementRoot(planSelections);
recomputePlan(getContainer());
planChanged();
+ } else {
+ planSelections = currentPage.getCheckedIUElements();
+ root = makeResolutionElementRoot(planSelections);
}
return selectNextPage(page, getCurrentStatus());
}
@@ -209,7 +211,6 @@ public abstract class ProvisioningOperationWizard extends Wizard {
*/
public void recomputePlan(IRunnableContext runnableContext) {
final Object[] elements = root.getChildren(root);
- final IInstallableUnit[] ius = ElementUtils.elementsToIUs(elements);
couldNotResolve = false;
try {
if (elements.length == 0) {
@@ -221,7 +222,7 @@ public abstract class ProvisioningOperationWizard extends Wizard {
MultiStatus status = PlanAnalyzer.getProfileChangeAlteredStatus();
ProfileChangeRequest request = computeProfileChangeRequest(elements, status, monitor);
if (request != null) {
- resolutionOperation = new PlannerResolutionOperation(ProvUIMessages.ProfileModificationWizardPage_ResolutionOperationLabel, ius, profileId, request, provisioningContext, status, false);
+ resolutionOperation = new PlannerResolutionOperation(ProvUIMessages.ProfileModificationWizardPage_ResolutionOperationLabel, profileId, request, provisioningContext, status, false);
try {
resolutionOperation.execute(monitor);
} catch (ProvisionException e) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java
index c5471123c..572c36afc 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java
index d3005da63..04f45bd0d 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java
@@ -11,10 +11,11 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.internal.provisional.p2.ui.IUPropertyUtils;
import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
index f5db65e1b..2da9dcce4 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
@@ -15,10 +15,10 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.ui.*;
import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.internal.provisional.p2.ui.*;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
import org.eclipse.equinox.internal.provisional.p2.ui.viewers.*;
@@ -129,7 +129,7 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
createSelectButtons(composite);
// The text area shows a description of the selected IU, or error detail if applicable.
- iuDetailsGroup = new IUDetailsGroup(sashForm, tableViewer, convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH), false);
+ iuDetailsGroup = new IUDetailsGroup(sashForm, tableViewer, convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH), true);
detailsArea = iuDetailsGroup.getDetailsArea();
updateStatus(root, resolvedOperation);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java
index f89825844..87db30ab2 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java
@@ -10,12 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+
import java.text.NumberFormat;
import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.jobs.*;
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java
index 7efc99a6b..e245a3f8e 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java
@@ -10,8 +10,9 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java
index 0ebe8792c..a8428ef43 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java
@@ -10,8 +10,9 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.internal.provisional.p2.metadata.IUpdateDescriptor;
import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
index ca8f6b92b..487c9be71 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
@@ -10,8 +10,9 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+
import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.AcceptLicensesWizardPage;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties
index a6e306cfb..38f764406 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties
@@ -11,6 +11,7 @@
ProfileChangeRequestBuildingRequest=Processing request
ProfileElement_InvalidProfile=Invalid profile ID {0}
+ProfileModificationAction_InvalidSelections=Problem determining user request. Profile id: {0}, Selection count: {1}
ProfileModificationAction_NoChangeRequestProvided=Could not interpret the request
ProfileModificationAction_NoExplanationProvided=Unexpected error while processing the request.
ProfileModificationAction_ResolutionOperationLabel=Calculating Requirements
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java
index 08f149a0d..a214daf52 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.model;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+
import java.util.*;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ProfileModificationAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ProfileModificationAction.java
index d49f8093f..0f4d527ac 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ProfileModificationAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ProfileModificationAction.java
@@ -11,6 +11,8 @@
package org.eclipse.equinox.internal.provisional.p2.ui.actions;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.*;
@@ -62,7 +64,7 @@ public abstract class ProfileModificationAction extends ProvisioningAction {
}
protected IStatus getNoProfileOrSelectionStatus(String id, IInstallableUnit[] ius) {
- return new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, NLS.bind("Problem determining user request. Profile id: {0}, Selection count: {1}", id, new Integer(ius.length)));
+ return new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, NLS.bind(ProvUIMessages.ProfileModificationAction_InvalidSelections, id, new Integer(ius.length)));
}
protected void run(final IInstallableUnit[] ius, final String id) {
@@ -102,7 +104,7 @@ public abstract class ProfileModificationAction extends ProvisioningAction {
return;
}
// We have a profile change request, let's get a plan for it. This could take awhile.
- final PlannerResolutionOperation operation = new PlannerResolutionOperation(ProvUIMessages.ProfileModificationAction_ResolutionOperationLabel, ius, id, request[0], null, additionalStatus, isResolveUserVisible());
+ final PlannerResolutionOperation operation = new PlannerResolutionOperation(ProvUIMessages.ProfileModificationAction_ResolutionOperationLabel, id, request[0], null, additionalStatus, isResolveUserVisible());
// Since we are resolving asynchronously, our job is done. Setting this allows
// callers to decide to close the launching window.
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=236495
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/UpdateAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/UpdateAction.java
index 9cbd4e228..9f3b4df7b 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/UpdateAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/UpdateAction.java
@@ -11,17 +11,15 @@
package org.eclipse.equinox.internal.provisional.p2.ui.actions;
-import java.util.*;
+import java.util.ArrayList;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.ui.PlanAnalyzer;
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.AvailableUpdateElement;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.internal.provisional.p2.ui.*;
import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.UpdateWizard;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.Updates;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
import org.eclipse.jface.viewers.ISelectionProvider;
@@ -30,8 +28,8 @@ import org.eclipse.ui.PlatformUI;
public class UpdateAction extends ExistingIUInProfileAction {
- IUElementListRoot root; // root that will be used to seed the wizard
- HashMap latestReplacements;
+ protected IUElementListRoot root; // root that will be used to seed the wizard
+ protected ArrayList initialSelections; // the elements that should be selected in the wizard
boolean resolveIsVisible = true;
QueryableMetadataRepositoryManager manager;
boolean skipSelectionPage = false;
@@ -52,11 +50,11 @@ public class UpdateAction extends ExistingIUInProfileAction {
protected int performAction(IInstallableUnit[] ius, String targetProfileId, PlannerResolutionOperation resolution) {
// Caches should have been created while formulating the plan
- Assert.isNotNull(latestReplacements);
+ Assert.isNotNull(initialSelections);
Assert.isNotNull(root);
Assert.isNotNull(resolution);
- UpdateWizard wizard = new UpdateWizard(getPolicy(), targetProfileId, root, latestReplacements.values().toArray(), resolution, manager);
+ UpdateWizard wizard = new UpdateWizard(getPolicy(), targetProfileId, root, initialSelections.toArray(), resolution, manager);
wizard.setSkipSelectionsPage(skipSelectionPage);
WizardDialog dialog = new WizardDialog(getShell(), wizard);
dialog.create();
@@ -66,50 +64,14 @@ public class UpdateAction extends ExistingIUInProfileAction {
}
protected ProfileChangeRequest getProfileChangeRequest(IInstallableUnit[] ius, String targetProfileId, MultiStatus status, IProgressMonitor monitor) {
- // Here we create a profile change request by finding the latest version available for any replacement.
- ArrayList toBeUpdated = new ArrayList();
- latestReplacements = new HashMap();
- ArrayList allReplacements = new ArrayList();
- SubMonitor sub = SubMonitor.convert(monitor, ProvUIMessages.ProfileChangeRequestBuildingRequest, ius.length);
- for (int i = 0; i < ius.length; i++) {
- ElementQueryDescriptor descriptor = getQueryProvider().getQueryDescriptor(new Updates(targetProfileId, new IInstallableUnit[] {ius[i]}));
- Iterator iter = descriptor.performQuery(sub).iterator();
- if (iter.hasNext())
- toBeUpdated.add(ius[i]);
- ArrayList currentReplacements = new ArrayList();
- root = new IUElementListRoot();
- while (iter.hasNext()) {
- IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
- if (iu != null) {
- AvailableUpdateElement element = new AvailableUpdateElement(root, iu, ius[i], targetProfileId, true);
- currentReplacements.add(element);
- allReplacements.add(element);
- }
- }
- root.setChildren(allReplacements.toArray());
- for (int j = 0; j < currentReplacements.size(); j++) {
- AvailableUpdateElement replacementElement = (AvailableUpdateElement) currentReplacements.get(j);
- AvailableUpdateElement latestElement = (AvailableUpdateElement) latestReplacements.get(replacementElement.getIU().getId());
- IInstallableUnit latestIU = latestElement == null ? null : latestElement.getIU();
- if (latestIU == null || replacementElement.getIU().getVersion().compareTo(latestIU.getVersion()) > 0)
- latestReplacements.put(replacementElement.getIU().getId(), replacementElement);
- }
- sub.worked(1);
- }
- if (toBeUpdated.size() <= 0) {
+ initialSelections = new ArrayList();
+ root = new IUElementListRoot();
+ ProfileChangeRequest request = UpdateWizard.createProfileChangeRequest(ius, targetProfileId, root, initialSelections, monitor);
+ if (request == null) {
status.add(PlanAnalyzer.getStatus(IStatusCodes.NOTHING_TO_UPDATE, null));
- sub.done();
return null;
}
- ProfileChangeRequest request = ProfileChangeRequest.createByProfileId(targetProfileId);
- Iterator iter = toBeUpdated.iterator();
- while (iter.hasNext())
- request.removeInstallableUnits(new IInstallableUnit[] {(IInstallableUnit) iter.next()});
- iter = latestReplacements.values().iterator();
- while (iter.hasNext())
- request.addInstallableUnits(new IInstallableUnit[] {((AvailableUpdateElement) iter.next()).getIU()});
- sub.done();
return request;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AcceptLicensesWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AcceptLicensesWizardPage.java
index 8fd829b2f..96fdd14f7 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AcceptLicensesWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AcceptLicensesWizardPage.java
@@ -10,10 +10,11 @@
*******************************************************************************/
package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+
import java.util.*;
import java.util.List;
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
import org.eclipse.equinox.internal.provisional.p2.engine.InstallableUnitOperand;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/InstallWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/InstallWizard.java
index 5882c6b8c..077867858 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/InstallWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/InstallWizard.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+
import java.util.ArrayList;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.MultiStatus;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/PreselectedIUInstallWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/PreselectedIUInstallWizard.java
index 11ed812d3..a899f84db 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/PreselectedIUInstallWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/PreselectedIUInstallWizard.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+
import java.util.ArrayList;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.MultiStatus;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UninstallWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UninstallWizard.java
index f562f92a4..511fc0eb7 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UninstallWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UninstallWizard.java
@@ -10,13 +10,14 @@
*******************************************************************************/
package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+
import java.util.ArrayList;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
import org.eclipse.equinox.internal.p2.ui.dialogs.*;
import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UpdateWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UpdateWizard.java
index cf03925b6..e05703253 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UpdateWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UpdateWizard.java
@@ -12,16 +12,15 @@
package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
import org.eclipse.equinox.internal.p2.ui.dialogs.*;
import org.eclipse.equinox.internal.p2.ui.model.AvailableUpdateElement;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepositoryManager;
+import org.eclipse.equinox.internal.provisional.p2.ui.*;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.Updates;
import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
import org.eclipse.jface.wizard.IWizardPage;
@@ -56,6 +55,69 @@ public class UpdateWizard extends WizardWithLicenses {
return (IInstallableUnit[]) replacements.toArray(new IInstallableUnit[replacements.size()]);
}
+ /**
+ * Create a profile change request that represents an update of the specified IUs to their latest versions.
+ * If an element root and selection container are provided, update those elements so that a wizard could
+ * be opened on them to reflect the profile change request.
+ *
+ * @param iusToUpdate
+ * @param profileId
+ * @param root
+ * @param initialSelections
+ * @param monitor
+ * @return the profile change request describing an update, or null if there is nothing to update.
+ */
+ public static ProfileChangeRequest createProfileChangeRequest(IInstallableUnit[] iusToUpdate, String profileId, IUElementListRoot root, Collection initialSelections, IProgressMonitor monitor) {
+ // Here we create a profile change request by finding the latest version available for any replacement.
+ ArrayList toBeUpdated = new ArrayList();
+ HashMap latestReplacements = new HashMap();
+ ArrayList allReplacements = new ArrayList();
+ SubMonitor sub = SubMonitor.convert(monitor, ProvUIMessages.ProfileChangeRequestBuildingRequest, 100 * iusToUpdate.length);
+ for (int i = 0; i < iusToUpdate.length; i++) {
+ ElementQueryDescriptor descriptor = Policy.getDefault().getQueryProvider().getQueryDescriptor(new Updates(profileId, new IInstallableUnit[] {iusToUpdate[i]}));
+ Iterator iter = descriptor.performQuery(sub).iterator();
+ if (iter.hasNext())
+ toBeUpdated.add(iusToUpdate[i]);
+ ArrayList currentReplacements = new ArrayList();
+ while (iter.hasNext()) {
+ IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
+ if (iu != null) {
+ AvailableUpdateElement element = new AvailableUpdateElement(root, iu, iusToUpdate[i], profileId, true);
+ currentReplacements.add(element);
+ allReplacements.add(element);
+ }
+ }
+ for (int j = 0; j < currentReplacements.size(); j++) {
+ AvailableUpdateElement replacementElement = (AvailableUpdateElement) currentReplacements.get(j);
+ AvailableUpdateElement latestElement = (AvailableUpdateElement) latestReplacements.get(replacementElement.getIU().getId());
+ IInstallableUnit latestIU = latestElement == null ? null : latestElement.getIU();
+ if (latestIU == null || replacementElement.getIU().getVersion().compareTo(latestIU.getVersion()) > 0)
+ latestReplacements.put(replacementElement.getIU().getId(), replacementElement);
+ }
+ sub.worked(100);
+ }
+ if (root != null)
+ root.setChildren(allReplacements.toArray());
+
+ if (initialSelections != null)
+ initialSelections.addAll(latestReplacements.values());
+
+ if (toBeUpdated.size() <= 0) {
+ sub.done();
+ return null;
+ }
+
+ ProfileChangeRequest request = ProfileChangeRequest.createByProfileId(profileId);
+ Iterator iter = toBeUpdated.iterator();
+ while (iter.hasNext())
+ request.removeInstallableUnits(new IInstallableUnit[] {(IInstallableUnit) iter.next()});
+ iter = latestReplacements.values().iterator();
+ while (iter.hasNext())
+ request.addInstallableUnits(new IInstallableUnit[] {((AvailableUpdateElement) iter.next()).getIU()});
+ sub.done();
+ return request;
+ }
+
public UpdateWizard(Policy policy, String profileId, IUElementListRoot root, Object[] initialSelections, PlannerResolutionOperation initialResolution, QueryableMetadataRepositoryManager manager) {
super(policy, profileId, root, initialSelections, initialResolution);
setWindowTitle(ProvUIMessages.UpdateAction_UpdatesAvailableTitle);
@@ -119,8 +181,9 @@ public class UpdateWizard extends WizardWithLicenses {
}
public IWizardPage getStartingPage() {
- if (skipSelectionsPage)
- return selectNextPage(mainPage, getCurrentStatus());
+ if (skipSelectionsPage) {
+ return getNextPage(mainPage);
+ }
return mainPage;
}
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/IUElementListRoot.java
index 3e130ca6e..5f1c71910 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/IUElementListRoot.java
@@ -8,7 +8,9 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
+package org.eclipse.equinox.internal.provisional.p2.ui.model;
+
+import org.eclipse.equinox.internal.p2.ui.model.ProvElement;
/**
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/PlannerResolutionOperation.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/PlannerResolutionOperation.java
index 2bf99b0fa..0eadc6190 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/PlannerResolutionOperation.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/PlannerResolutionOperation.java
@@ -16,7 +16,6 @@ import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.internal.provisional.p2.ui.IStatusCodes;
import org.eclipse.equinox.internal.provisional.p2.ui.ResolutionResult;
@@ -33,15 +32,13 @@ public class PlannerResolutionOperation extends ProvisioningOperation {
ProvisioningPlan plan;
MultiStatus additionalStatus;
ResolutionResult report;
- IInstallableUnit[] iusInvolved;
ProvisioningContext provisioningContext;
- public PlannerResolutionOperation(String label, IInstallableUnit[] iusInvolved, String profileId, ProfileChangeRequest request, ProvisioningContext provisioningContext, MultiStatus additionalStatus, boolean isUser) {
+ public PlannerResolutionOperation(String label, String profileId, ProfileChangeRequest request, ProvisioningContext provisioningContext, MultiStatus additionalStatus, boolean isUser) {
super(label);
this.request = request;
this.profileId = profileId;
this.isUser = isUser;
- this.iusInvolved = iusInvolved;
if (provisioningContext == null)
this.provisioningContext = new ProvisioningContext();
else

Back to the top

-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/build.properties19
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/plugin.properties14
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/plugin.xml27
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/prepareforpii.xml37
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/property_file/emftosed.properties13
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/property_file/emfworkbenchedit.properties21
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/rose/ModuleCore.genmodel47
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.cat1065
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.ecore47
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.mdl8839
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/schema/adapterFactory.exsd144
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/schema/editModel.exsd181
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/schema/editModelExtension.exsd130
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/schema/modifierHelperFactory.exsd160
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/CompatibilityWorkbenchURIConverterImpl.java90
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFAdapterFactory.java66
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFWorkbenchContext.java414
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFWorkbenchEditResourceHandler.java53
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EmfValidationHandler.java61
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/PassthruResourceSet.java144
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/WorkbenchResourceHelper.java454
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/AdapterFactoryDescriptor.java162
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/AdapterFactoryRegistry.java116
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ChildCommand.java103
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ClientAccessRegistry.java102
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ClientAccessRegistryException.java152
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EMFWorkbenchEditContextFactory.java48
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelExtension.java69
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelExtensionRegistry.java98
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRegistry.java291
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelResource.java115
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRetriever.java48
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ExtendedComposedAdapterFactory.java103
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/InvertedCommand.java68
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ParentCommand.java156
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ReadOnlyClientAccessRegistry.java51
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/Snapshot.java45
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/WrappingCommandStack.java39
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/AbstractEditModelCommand.java58
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ComposedAccessorKey.java56
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ComposedEditModel.java280
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/CompoundingCommandStack.java152
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/DynamicAdapterFactory.java642
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EMFWorkbenchEditPlugin.java85
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModel.java1586
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelCommand.java48
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelEvent.java122
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelFactory.java62
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelListener.java24
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelNature.java64
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/IEditModelFactory.java31
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/LooseComposedEditModel.java37
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModelModifier.java615
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelper.java362
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperChainer.java49
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperFactory.java34
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperRegistry.java273
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/OwnerProvider.java31
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ProjectResourceSetEditImpl.java53
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ResourceSetWorkbenchEditSynchronizer.java383
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/validateedit/IValidateEditContext.java30
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/validateedit/ResourceStateInputProvider.java60
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/validateedit/ResourceStateValidator.java57
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/validateedit/ResourceStateValidatorImpl.java446
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/validateedit/ResourceStateValidatorPresenter.java50
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/validateedit/ValidateEditHeadlessContext.java97
-rw-r--r--plugins/org.eclipse.wst.common.environment/.classpath7
-rw-r--r--plugins/org.eclipse.wst.common.environment/.cvsignore5
-rw-r--r--plugins/org.eclipse.wst.common.environment/.options21
-rw-r--r--plugins/org.eclipse.wst.common.environment/.project28
-rw-r--r--plugins/org.eclipse.wst.common.environment/.settings/org.eclipse.jdt.core.prefs57
-rw-r--r--plugins/org.eclipse.wst.common.environment/.settings/org.eclipse.pde.prefs12
-rw-r--r--plugins/org.eclipse.wst.common.environment/META-INF/MANIFEST.MF12
-rw-r--r--plugins/org.eclipse.wst.common.environment/about.html22
-rw-r--r--plugins/org.eclipse.wst.common.environment/build.properties6
-rw-r--r--plugins/org.eclipse.wst.common.environment/plugin.properties13
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/Choice.java103
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/EnvironmentException.java60
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/EnvironmentService.java89
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/IEnvironment.java52
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/ILog.java130
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/IStatusHandler.java54
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/NullStatusHandler.java70
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/StatusException.java74
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/uri/IURI.java227
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/uri/IURIFactory.java52
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/uri/IURIFilter.java31
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/uri/IURIScheme.java75
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/uri/IURIVisitor.java29
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/uri/SimpleURIFactory.java130
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/uri/URIException.java83
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/ConsoleEclipseEnvironment.java67
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/EclipseLog.java128
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/EclipseScheme.java197
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/EclipseURI.java518
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/FileResourceOutputStream.java145
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/FileResourceUtils.java550
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/Messages.java39
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/environment.properties40
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/relative/RelativeScheme.java87
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/relative/RelativeURI.java271
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/uri/file/FileScheme.java106
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/uri/file/FileURI.java297
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/.classpath8
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/.cvsignore6
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/.project28
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/META-INF/MANIFEST.MF20
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/about.html22
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/build.properties20
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/plugin.properties18
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/plugin.xml53
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/prepareforpii.xml38
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/property_files/wtpcommonui.properties36
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/schema/DataModelWizardExtension.exsd113
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/schema/extendableWizard.exsd103
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/schema/extendableWizardPage.exsd143
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/schema/extendedViewer.exsd138
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/schema/wtpuiAction.exsd367
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/AddablePageGroup.java16
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/DataModelSynchHelper.java562
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/DataModelWizard.java374
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/DataModelWizardFactory.java65
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/DataModelWizardPage.java430
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/IDMPageGroup.java34
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/IDMPageGroupHandler.java63
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/IDMPageHandler.java59
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/SimplePageGroup.java102
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/dialog/ui/ErrorDialog.java99
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/dialog/ui/InfoDialog.java98
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/dialog/ui/MessageDialog.java636
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/dialog/ui/OptionsDialog.java107
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/dialog/ui/StatusDialogConstants.java51
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/dialog/ui/WarningDialog.java103
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/eclipse/ui/EclipseEnvironment.java79
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/eclipse/ui/EclipseStatusHandler.java133
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/eclipse/ui/Messages.java25
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/eclipse/ui/environment.properties17
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/CommonUIPluginConstants.java28
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardExtensionFactory.java44
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageElement.java270
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageExtensionManager.java279
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageFactoryElement.java96
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DataModelWizardExtensionReader.java84
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/ExtensibleViewRegistry.java177
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/IExtensibleViewFactory.java21
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/IOperationNode.java48
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/AbstractWTPUIPlugin.java66
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/ClosableWizardDialog.java41
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/DMPageGroupElementImpl.java67
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/DisplayUtility.java36
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/ErrorDialog.java191
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/ExecutionListener.java18
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/GenericWizardNode.java73
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/ListMessageDialog.java217
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/ListenerList.java81
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/NewProjectGroup.java215
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/OverlayIcon.java121
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/PageGroupManager.java584
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/RunnableOperationWrapper.java45
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/RunnableWithProgressWrapper.java79
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/SaveHandlerUI.java128
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/SimplePageGroupHandler.java39
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/SimplePageHandler.java24
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/TimedKeyListener.java135
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/TimedModifyListener.java55
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/Timer.java253
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/TimerQueue.java231
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/UIEnablementIdentifier.java75
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/UIEnablementManager.java59
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/UIOperationHandler.java187
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/UITesterImpl.java51
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/ValidationStatus.java166
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/WTPActivityBridgeHelperImpl.java81
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/WTPActivityHelper.java60
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/WTPCommonUIResourceHandler.java68
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/WTPGenericActionIds.java32
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/WTPUIPlugin.java140
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/WorkspaceModifyComposedOperation.java82
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/package.html36
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/package.xml18
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/.classpath8
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/.cvsignore9
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/.options3
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/.project28
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/META-INF/MANIFEST.MF25
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/about.html22
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/build.properties22
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/component.xml31
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/plugin.properties15
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/plugin.xml30
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/prepareforpii.xml37
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/schema/DataModelProviderExtension.exsd153
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/schema/OperationExtension.exsd119
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/schema/WTPActivityBridgeHelper.exsd103
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/schema/functionGroup.exsd186
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src-non_workbench/org/eclipse/wst/common/frameworks/internal/enablement/nonui/IWFTWrappedException.java40
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src-non_workbench/org/eclipse/wst/common/frameworks/internal/enablement/nonui/WFTWrappedException.java93
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src-non_workbench/org/eclipse/wst/common/frameworks/internal/enablement/nonui/WorkbenchUtil.java37
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/AbstractDataModelOperation.java181
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/AbstractDataModelProvider.java327
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/DataModelEvent.java162
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/DataModelFactory.java108
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/DataModelPropertyDescriptor.java140
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/IDataModel.java724
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/IDataModelListener.java34
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/IDataModelOperation.java102
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/IDataModelProperties.java45
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/IDataModelProvider.java119
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/package.xml20
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/properties/package.xml19
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/AbstractRegistryDescriptor.java55
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/AdaptabilityUtility.java32
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/ConfigurationElementWrapper.java69
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/DataModelManager.java71
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/ExceptionHelper.java65
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/ISaveHandler.java28
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/IWrappedException.java41
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/Messages.java59
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/OperationListener.java21
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/OperationManager.java464
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SaveFailedException.java63
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SaveHandlerHeadless.java86
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SaveHandlerRegister.java34
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/WTPPlugin.java77
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/WTPProjectUtilities.java155
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/WTPResourceHandler.java71
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/WrappedException.java81
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/WrappedRuntimeException.java115
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/activities/WTPActivityBridge.java106
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/activities/WTPActivityBridgeHelper.java36
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/DataModelExtensionReader.java165
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/DataModelImpl.java464
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/ExtendableOperationImpl.java333
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/IWorkspaceRunnableWithStatus.java42
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/AbstractIdentifiable.java29
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/AscendingGroupComparator.java56
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/DataModelEnablementFactory.java62
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/DescendingGroupComparator.java58
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/EnablementIdentifier.java233
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/EnablementIdentifierEvent.java78
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/EnablementManager.java171
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/FunctionGroup.java162
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/FunctionGroupPatternBinding.java98
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/FunctionGroupRegistry.java255
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/IEnablementIdentifier.java82
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/IEnablementIdentifierListener.java34
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/IEnablementManager.java59
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/IGroupInitializer.java31
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/Identifiable.java32
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/IdentifiableComparator.java77
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/Util.java354
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/ComposedExtendedOperationHolder.java94
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/IHeadlessRunnableWithProgress.java42
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/IOperationHandler.java57
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/IProjectCreationProperties.java52
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/IProjectCreationPropertiesNew.java64
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/OperationExtension.java77
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/OperationExtensionReader.java83
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/OperationStatus.java63
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/ProjectCreationDataModelProvider.java196
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/ProjectCreationDataModelProviderNew.java210
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/ProjectCreationOperation.java76
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/package.html33
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/package.xml18
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/plugin/WTPCommonMessages.java51
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/plugin/WTPCommonPlugin.java128
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/wtp_common.properties52
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/.classpath7
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/.cvsignore7
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/.options1
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/.project28
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/META-INF/MANIFEST.MF31
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/about.html22
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/build.properties19
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/component.xml1
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/componentCore.xsd52
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/componentcore_model.jpgbin71857 -> 0 bytes-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/componentcore_package.jpgbin78592 -> 0 bytes-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/mapping.jpgbin40741 -> 0 bytes-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/metamodel_components.jpgbin27797 -> 0 bytes-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/module_structural_model.jpgbin130999 -> 0 bytes-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/modulecore.jpgbin142981 -> 0 bytes-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/virtual_path_api.jpgbin111861 -> 0 bytes-rw-r--r--plugins/org.eclipse.wst.common.modulecore/model/Java.epx6127
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/model/Java.properties428
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/model/VirtualPathAPI.emx517
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/model/componentCore.ecore77
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/model/componentCore.emx609
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/model/componentCore.genmodel52
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/model/componentCorePackage.emx310
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/ArtifactEdit.java530
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/ComponentCore.java198
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/IEditModelHandler.java60
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/ModuleCoreNature.java564
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/UnresolveableURIException.java32
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/FacetDataModelConfigAdapter.java80
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/FacetDataModelProvider.java80
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/FacetInstallDataModelProvider.java110
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/FacetProjectCreationDataModelProvider.java333
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/FlexibleProjectCreationDataModelProvider.java119
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/ProjectMigratorDataModelProvider.java32
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/IComponentCreationDataModelProperties.java75
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/ICreateReferenceComponentsDataModelProperties.java32
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/IFacetDataModelProperties.java41
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/IFacetInstallDataModelProperties.java15
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/IFacetProjectCreationDataModelProperties.java66
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/IFlexibleProjectCreationDataModelProperties.java40
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/IProjectMigratorDataModelProperties.java20
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/package.xml21
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ArtifactEditModel.java306
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ComponentResource.java171
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ComponentType.java131
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ComponentcoreFactory.java91
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ComponentcorePackage.java772
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/DependencyType.java161
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/IComponentProjectMigrator.java18
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleMigratorManager.java235
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleStructuralModel.java258
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModulecorePlugin.java106
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ProjectComponents.java83
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ProjectMigratorRegistry.java77
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/Property.java83
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ReferencedComponent.java156
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/StructureEdit.java918
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/WorkbenchComponent.java170
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraph.java54
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphManager.java137
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ArtifactEditModelFactory.java64
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ComponentCoreURIConverter.java156
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ComponentResourceImpl.java434
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ComponentTypeImpl.java290
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ComponentcoreFactoryImpl.java214
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ComponentcorePackageImpl.java624
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/IModuleStructureListener.java24
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/MappedComponentXMIHelper.java86
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ModuleIndexingAdapter.java57
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ModuleStructuralModelFactory.java43
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ModuleStructureEvent.java46
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ModuleURIUtil.java191
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/PlatformURLModuleConnection.java118
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ProjectComponentsImpl.java259
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/PropertyImpl.java213
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ReferencedComponentImpl.java333
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ReferencedComponentXMIResourceFactory.java34
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ReferencedComponentXMIResourceImpl.java34
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ResourceTreeNode.java288
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ResourceTreeRoot.java177
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ResourceTreeRootAdapter.java66
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WTPEntityResolver.java142
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WTPModulesInit.java74
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WTPModulesResource.java65
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WTPModulesResourceFactory.java81
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WTPResourceFactoryRegistry.java31
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WorkbenchComponentImpl.java573
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/ArtifactEditOperationDataModelProvider.java111
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/ArtifactEditProviderOperation.java106
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/ComponentCreationDataModelProvider.java238
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/ComponentCreationOperation.java97
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/CreateReferenceComponentsDataModelProvider.java48
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/CreateReferenceComponentsOp.java100
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/FacetDataModelOperation.java49
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/FacetProjectCreationOperation.java211
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/FlexibleProjectCreationOperation.java92
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/IArtifactEditOperationDataModelProperties.java38
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/ProjectMigratorDataModelOperation.java47
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/RemoveReferenceComponentOperation.java100
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/RemoveReferenceComponentsDataModelProvider.java26
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualArchiveComponent.java228
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java476
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualContainer.java351
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualFile.java123
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualFolder.java150
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualReference.java106
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualResource.java338
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ArtifactEditAdapterFactory.java106
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ArtifactEditRegistryReader.java117
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentResolver.java178
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentUtilities.java288
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentcoreAdapterFactory.java208
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentcoreSwitch.java240
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/DependencyTypeTranslator.java49
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/DeployedPathProvider.java40
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/EclipseResourceAdapter.java80
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/HRefTranslator.java91
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IArtifactEditFactory.java27
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IModuleConstants.java46
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IPathProvider.java28
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IPathTranslator.java65
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ModuleCoreEclipseAdapterFactory.java78
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/SourcePathProvider.java40
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/URITranslator.java64
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/WTPModulesTranslator.java120
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/WTPModulesXmlMapperI.java35
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ZipFileExporter.java141
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/package.html368
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/package.xml331
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualComponent.java238
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualContainer.java283
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualFile.java36
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualFolder.java37
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualReference.java90
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualResource.java405
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/package.html80
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/package.xml88
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/plugin.properties11
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/plugin.xml69
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/schema/ComponentProjectMigrator.exsd103
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/schema/artifactedit.exsd112
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/schema/componentCore.xsd52
-rw-r--r--plugins/org.eclipse.wst.common.ui/.classpath7
-rw-r--r--plugins/org.eclipse.wst.common.ui/.cvsignore7
-rw-r--r--plugins/org.eclipse.wst.common.ui/.project28
-rw-r--r--plugins/org.eclipse.wst.common.ui/META-INF/MANIFEST.MF20
-rw-r--r--plugins/org.eclipse.wst.common.ui/README.txt1
-rw-r--r--plugins/org.eclipse.wst.common.ui/about.html22
-rw-r--r--plugins/org.eclipse.wst.common.ui/build.properties9
-rw-r--r--plugins/org.eclipse.wst.common.ui/component.xml62
-rw-r--r--plugins/org.eclipse.wst.common.ui/plugin.properties132
-rw-r--r--plugins/org.eclipse.wst.common.ui/plugin.xml8
-rw-r--r--plugins/org.eclipse.wst.common.ui/schema/exampleProjectCreationWizard.exsd243
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/UIPlugin.java166
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dialogs/SelectSingleFileDialog.java115
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/DefaultDragAndDropCommand.java110
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/DragAndDropCommand.java29
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/DragAndDropManager.java19
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/ObjectTransfer.java117
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/ViewerDragAdapter.java86
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/ViewerDropAdapter.java768
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/NavigableTableViewer.java46
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/ResourceFilter.java101
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/SelectMultiFilePage.java389
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/SelectSingleFilePage.java95
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/SelectSingleFileView.java400
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/TableNavigator.java409
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/provisional/editors/PostMultiPageEditorSite.java100
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/provisional/editors/PostMultiPageSelectionProvider.java49
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/provisional/editors/PostSelectionMultiPageEditorPart.java44
-rw-r--r--plugins/org.eclipse.wst.validation.ui/.classpath8
-rw-r--r--plugins/org.eclipse.wst.validation.ui/.cvsignore6
-rw-r--r--plugins/org.eclipse.wst.validation.ui/.project26
-rw-r--r--plugins/org.eclipse.wst.validation.ui/META-INF/MANIFEST.MF21
-rw-r--r--plugins/org.eclipse.wst.validation.ui/about.html22
-rw-r--r--plugins/org.eclipse.wst.validation.ui/build.properties18
-rw-r--r--plugins/org.eclipse.wst.validation.ui/build/buildcontrol.properties16
-rw-r--r--plugins/org.eclipse.wst.validation.ui/build/package.xml18
-rw-r--r--plugins/org.eclipse.wst.validation.ui/build/sourcejar.txt1
-rw-r--r--plugins/org.eclipse.wst.validation.ui/build/wsBuild.xml17
-rw-r--r--plugins/org.eclipse.wst.validation.ui/plugin.properties16
-rw-r--r--plugins/org.eclipse.wst.validation.ui/plugin.xml53
-rw-r--r--plugins/org.eclipse.wst.validation.ui/prepareforpii.xml38
-rw-r--r--plugins/org.eclipse.wst.validation.ui/property_files/validate_ui.properties113
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ContextIds.java46
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ProgressAndTextDialog.java160
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ResourceConstants.java89
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ResourceHandler.java110
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidateAction.java66
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationMenuAction.java568
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPreferencePage.java946
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPropertiesPage.java1033
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationUIConstants.java19
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/plugin/RunnableWithProgressWrapper.java97
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/plugin/ValidationUIPlugin.java98
-rw-r--r--plugins/org.eclipse.wst.validation/.classpath9
-rw-r--r--plugins/org.eclipse.wst.validation/.cvsignore10
-rw-r--r--plugins/org.eclipse.wst.validation/.options2
-rw-r--r--plugins/org.eclipse.wst.validation/.project26
-rw-r--r--plugins/org.eclipse.wst.validation/META-INF/MANIFEST.MF20
-rw-r--r--plugins/org.eclipse.wst.validation/about.html22
-rw-r--r--plugins/org.eclipse.wst.validation/build.properties22
-rw-r--r--plugins/org.eclipse.wst.validation/component.xml1
-rw-r--r--plugins/org.eclipse.wst.validation/plugin.properties20
-rw-r--r--plugins/org.eclipse.wst.validation/plugin.xml113
-rw-r--r--plugins/org.eclipse.wst.validation/prepareforpii.xml38
-rw-r--r--plugins/org.eclipse.wst.validation/property_files/validate_base.properties139
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ConfigurationConstants.java78
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ConfigurationManager.java275
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/EventManager.java430
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/FilterUtil.java732
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/GlobalConfiguration.java185
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/IProjectValidationHelper.java24
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/IValidationSelectionHandler.java35
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/InternalValidatorManager.java206
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ProjectConfiguration.java615
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ReferencialFileValidatorExtension.java86
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ReferencialFileValidatorRegistryReader.java130
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/RegistryConstants.java71
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ResourceConstants.java117
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ResourceHandler.java111
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/TaskListUtility.java571
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/TimeEntry.java102
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/VThreadManager.java169
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationConfiguration.java769
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationFactoryImpl.java34
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationRegistryReader.java1394
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationSelectionHandlerRegistryReader.java90
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorActionFilter.java130
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorFilter.java111
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorMetaData.java510
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorNameFilter.java170
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorTypeFilter.java157
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/AllValidatorsOperation.java72
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/DefaultResourceUtil.java25
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/EnabledIncrementalValidatorsOperation.java236
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/EnabledValidatorsOperation.java165
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/IResourceUtil.java22
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/IRuleGroup.java41
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/IWorkbenchContext.java176
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/LocalizedMessage.java64
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/OneValidatorOperation.java124
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ReferencialFileValidator.java29
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ReferencialFileValidatorHelper.java69
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ResourceHandler.java20
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/TaskListHelper.java107
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationBuilder.java300
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationConstants.java25
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationOperation.java1480
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationUtility.java121
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorManager.java1363
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorSubsetOperation.java317
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchContext.java790
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchFileDelta.java78
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchReporter.java737
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/plugin/ValidationHelperRegistryReader.java69
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/plugin/ValidationPlugin.java159
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/provisional/ValidationFactory.java46
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/FileDelta.java84
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/IFileDelta.java59
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/IMessageAccess.java47
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/Message.java373
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/MessageFilter.java129
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/ValidationException.java163
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/ValidatorLauncher.java93
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IMessage.java330
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IMetaModelContext.java17
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IReporter.java164
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IValidationContext.java84
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IValidator.java71
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/MessageLimitException.java27
-rw-r--r--plugins/org.eclipse.wst.validation/xsds/referencialFileExtSchema.exsd118
-rw-r--r--plugins/org.eclipse.wst.validation/xsds/validationHelper.exsd113
-rw-r--r--plugins/org.eclipse.wst.validation/xsds/validationSelectionHandler.exsd117
-rw-r--r--plugins/org.eclipse.wst.validation/xsds/validatorExtSchema.exsd284
682 files changed, 0 insertions, 107657 deletions
diff --git a/features/org.eclipse.wst.common_ui.feature/.cvsignore b/features/org.eclipse.wst.common_ui.feature/.cvsignore
deleted file mode 100644
index e00af7da3..000000000
--- a/features/org.eclipse.wst.common_ui.feature/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-build.xml
-org.eclipse.wst.common_ui.feature_1.0.0.bin.dist.zip
diff --git a/features/org.eclipse.wst.common_ui.feature/.project b/features/org.eclipse.wst.common_ui.feature/.project
deleted file mode 100644
index 221164fec..000000000
--- a/features/org.eclipse.wst.common_ui.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.common_ui.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.wst.common_ui.feature/build.properties b/features/org.eclipse.wst.common_ui.feature/build.properties
deleted file mode 100644
index d6a4dce09..000000000
--- a/features/org.eclipse.wst.common_ui.feature/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-bin.includes = feature.xml,\
- eclipse_update_120.jpg,\
- epl-v10.html,\
- license.html,\
- feature.properties
-src.includes = license.html,\
- feature.xml,\
- epl-v10.html,\
- eclipse_update_120.jpg,\
- build.properties
diff --git a/features/org.eclipse.wst.common_ui.feature/eclipse_update_120.jpg b/features/org.eclipse.wst.common_ui.feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/features/org.eclipse.wst.common_ui.feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.wst.common_ui.feature/epl-v10.html b/features/org.eclipse.wst.common_ui.feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/features/org.eclipse.wst.common_ui.feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.wst.common_ui.feature/feature.properties b/features/org.eclipse.wst.common_ui.feature/feature.properties
deleted file mode 100644
index 64893f7b7..000000000
--- a/features/org.eclipse.wst.common_ui.feature/feature.properties
+++ /dev/null
@@ -1,130 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Eclipse.org update site
-
-# "description" property - description of the feature
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.wst.common_ui.feature/feature.xml b/features/org.eclipse.wst.common_ui.feature/feature.xml
deleted file mode 100644
index 1a56b2ea9..000000000
--- a/features/org.eclipse.wst.common_ui.feature/feature.xml
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.wst.common_ui.feature"
- label="org.eclipse.wst.common_ui.feature"
- version="1.0.201.qualifier"
- provider-name="Eclipse.org">
-
- <description>
- %description
- </description>
-
- <license url="license.html">
- %license
- </license>
-
- <url>
- <update label="Web Tools Platform (WTP) Updates" url="http://download.eclipse.org/webtools/updates/"/>
- </url>
-
- <includes
- id="org.eclipse.wst.common_userdoc.feature"
- version="0.0.0"/>
-
- <requires>
- <import feature="org.eclipse.gef" version="3.1.1" match="equivalent"/>
- <import feature="org.eclipse.wst.common_core.feature" version="1.0.2" match="equivalent"/>
- </requires>
-
- <plugin
- id="org.eclipse.wst.command.env.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.frameworks.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.infopop"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.navigator.views"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.navigator.workbench"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.project.facet.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.snippets"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.ui.properties"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.internet.proxy"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.internet.proxy.infopop"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.internet.cache"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.validation.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.command.env.infopop"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.validation.infopop"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/features/org.eclipse.wst.common_ui.feature/license.html b/features/org.eclipse.wst.common_ui.feature/license.html
deleted file mode 100644
index 2347060ef..000000000
--- a/features/org.eclipse.wst.common_ui.feature/license.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
-<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
-<HTML><HEAD><TITLE>Eclipse.org Software User Agreement</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<META content="MSHTML 6.00.2800.1479" name=GENERATOR></HEAD>
-<BODY lang=EN-US vLink=purple link=blue>
-<H2>Eclipse Foundation Software User Agreement</H2>
-<P>January 28, 2005</P>
-<H3>Usage Of Content</H3>
-<P>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION
-AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF
-THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE
-TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
-BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED
-BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
-AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY
-APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU
-MAY NOT USE THE CONTENT.</P>
-<H3>Applicable Licenses</H3>
-<P>Unless otherwise indicated, all Content made available by the Eclipse
-Foundation is provided to you under the terms and conditions of the Eclipse
-Public License Version 1.0 ("EPL"). A copy of the EPL is provided with this
-Content and is also available at <A
-href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-<P>Content includes, but is not limited to, source code, object code,
-documentation and other files maintained in the Eclipse.org CVS repository
-("Repository") in CVS modules ("Modules") and made available as downloadable
-archives ("Downloads").</P>
-<P>Content may be apportioned into plug-ins ("Plug-ins"), plug-in fragments
-("Fragments"), and features ("Features"). A Feature is a bundle of one or more
-Plug-ins and/or Fragments and associated material. Files named "feature.xml" may
-contain a list of the names and version numbers of the Plug-ins and/or Fragments
-associated with a Feature. Plug-ins and Fragments are located in directories
-named "plugins" and Features are located in directories named "features".</P>
-<P>Features may also include other Features ("Included Features"). Files named
-"feature.xml" may contain a list of the names and version numbers of Included
-Features.</P>
-<P>The terms and conditions governing Plug-ins and Fragments should be contained
-in files named "about.html" ("Abouts"). The terms and conditions governing
-Features and Included Features should be contained in files named "license.html"
-("Feature Licenses"). Abouts and Feature Licenses may be located in any
-directory of a Download or Module including, but not limited to the following
-locations:</P>
-<UL>
- <LI>The top-level (root) directory
- <LI>Plug-in and Fragment directories
- <LI>Subdirectories of the directory named "src" of certain Plug-ins
- <LI>Feature directories </LI></UL>
-<P>Note: if a Feature made available by the Eclipse Foundation is installed
-using the Eclipse Update Manager, you must agree to a license ("Feature Update
-License") during the installation process. If the Feature contains Included
-Features, the Feature Update License should either provide you with the terms
-and conditions governing the Included Features or inform you where you can
-locate them. Feature Update Licenses may be found in the "license" property of
-files named "feature.properties". Such Abouts, Feature Licenses and Feature
-Update Licenses contain the terms and conditions (or references to such terms
-and conditions) that govern your use of the associated Content in that
-directory.</P>
-<P>THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL
-OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</P>
-<UL>
- <LI>Common Public License Version 1.0 (available at <A
- href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</A>)
-
- <LI>Apache Software License 1.1 (available at <A
- href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</A>)
-
- <LI>Apache Software License 2.0 (available at <A
- href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</A>)
-
- <LI>IBM Public License 1.0 (available at <A
- href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</A>)
-
- <LI>Metro Link Public License 1.00 (available at <A
- href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</A>)
-
- <LI>Mozilla Public License Version 1.1 (available at <A
- href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</A>)
- </LI></UL>
-<P>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License is
-provided, please contact the Eclipse Foundation to determine what terms and
-conditions govern that particular Content.</P>
-<H3>Cryptography</H3>
-<P>Content may contain encryption software. The country in which you are
-currently may have restrictions on the import, possession, and use, and/or
-re-export to another country, of encryption software. BEFORE using any
-encryption software, please check the country's laws, regulations and policies
-concerning the import, possession, or use, and re-export of encryption software,
-to see if this is permitted.</P></BODY></HTML>
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/build.properties
deleted file mode 100644
index e87855538..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes =\
-epl-v10.html,\
-eclipse_update_120.jpg,\
-feature.xml,\
-feature.properties,\
-license.html
-
-generate.feature@org.eclipse.wst.common_core.feature.source = org.eclipse.wst.common_core.feature
-
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index 022ad2955..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html>
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 01950e325..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,132 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Eclipse JDT Plug-in Developer Resources
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Eclipse.org update site
-
-# "description" property - description of the feature
-description=API documentation and source code zips for Eclipse Java development tools.
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.xml b/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.xml
deleted file mode 100644
index 4e1bb1c8b..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.wst.common_ui.feature.source"
- label="WST Common UI Feature Source"
- version="1.0.2.qualifier"
- provider-name="Eclipse.org">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="license.html">
- %license
- </license>
-
- <url>
- <update label="Web Tools Platform (WTP) Updates" url="http://download.eclipse.org/webtools/updates/"/>
- </url>
-
-
- <includes
- id="org.eclipse.wst.common_core.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.wst.common_core.feature.source"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.wst.common_ui.feature.source"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
-</feature>
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/license.html b/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 0a8aea00f..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>February 24, 2005</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html>
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index 2dee36a2e..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,31 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.gif
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional
-
-
-
-
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index 0dfb7355d..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 40314ea70..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Web Standard Tools - Common UI\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Eclipse contributors and others 2005. All rights reserved.\n\
-Visit http://www.eclipse.org/webtools
-
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 5895597f9..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.gif, plugin.properties, plugin.xml, src/**, META-INF/
-sourcePlugin = true
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/eclipse32.gif b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/eclipse32.gif
deleted file mode 100644
index e6ad7ccd7..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/eclipse32.gif
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/eclipse32.png b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 50ae49de2..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 3c25535f8..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName=Web Standard Tools - Common UI
-providerName=Eclipse.org
diff --git a/plugins/org.eclipse.wst.common.emf/.classpath b/plugins/org.eclipse.wst.common.emf/.classpath
deleted file mode 100644
index de9605dc5..000000000
--- a/plugins/org.eclipse.wst.common.emf/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="wtpemf/"/>
- <classpathentry kind="src" path="workbench/"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.wst.common.emf/.cvsignore b/plugins/org.eclipse.wst.common.emf/.cvsignore
deleted file mode 100644
index 2a090b621..000000000
--- a/plugins/org.eclipse.wst.common.emf/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-bin
-runtime
-temp.folder
-build.xml
-org.eclipse.wst.common.emf_1.0.0.zip
-src.zip
-@dot
diff --git a/plugins/org.eclipse.wst.common.emf/.project b/plugins/org.eclipse.wst.common.emf/.project
deleted file mode 100644
index 5b5f0fe9b..000000000
--- a/plugins/org.eclipse.wst.common.emf/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.common.emf</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.wst.common.emf/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.emf/META-INF/MANIFEST.MF
deleted file mode 100644
index 472cff0a8..000000000
--- a/plugins/org.eclipse.wst.common.emf/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: EMF Utilities
-Bundle-SymbolicName: org.eclipse.wst.common.emf; singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.wst.common.internal.emf.plugin.EcoreUtilitiesPlugin
-Bundle-Vendor: Eclipse.org
-Bundle-Localization: plugin
-Export-Package: .,
- org.eclipse.wst.common.internal.emf.plugin,
- org.eclipse.wst.common.internal.emf.resource,
- org.eclipse.wst.common.internal.emf.utilities
-Require-Bundle: org.eclipse.emf.ecore.xmi,
- org.eclipse.wst.common.frameworks,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.jem.util
-Eclipse-AutoStart: true
diff --git a/plugins/org.eclipse.wst.common.emf/about.html b/plugins/org.eclipse.wst.common.emf/about.html
deleted file mode 100644
index 6f6b96c4c..000000000
--- a/plugins/org.eclipse.wst.common.emf/about.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>February 24, 2005</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/build.properties b/plugins/org.eclipse.wst.common.emf/build.properties
deleted file mode 100644
index b37b0c53f..000000000
--- a/plugins/org.eclipse.wst.common.emf/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- META-INF/,\
- about.html,\
- plugin.properties,\
- .,\
- schema/
-jars.compile.order = .
-src.includes = component.xml,\
- schema/
-output.. = bin/
-source.. = wtpemf/,\
- workbench/
diff --git a/plugins/org.eclipse.wst.common.emf/component.xml b/plugins/org.eclipse.wst.common.emf/component.xml
deleted file mode 100644
index 9530d3307..000000000
--- a/plugins/org.eclipse.wst.common.emf/component.xml
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><component xmlns="http://eclipse.org/wtp/releng/tools/component-model" name="org.eclipse.wst.common.emf"><component-depends unrestricted="true"></component-depends><plugin id="org.eclipse.wst.common.emf" fragment="false"/><plugin id="org.eclipse.wst.common.emfworkbench.integration" fragment="false"/></component> \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/plugin.properties b/plugins/org.eclipse.wst.common.emf/plugin.properties
deleted file mode 100644
index dda8cb4aa..000000000
--- a/plugins/org.eclipse.wst.common.emf/plugin.properties
+++ /dev/null
@@ -1 +0,0 @@
-PackageURIMap=PackageURIMap \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/plugin.xml b/plugins/org.eclipse.wst.common.emf/plugin.xml
deleted file mode 100644
index f74b3988a..000000000
--- a/plugins/org.eclipse.wst.common.emf/plugin.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension-point id="packageURIMap" name="%PackageURIMap" schema="schema/packageURIMap.exsd"/>
-
-<!-- Need to register the Ecore specific package mappings -->
- <extension
- point="org.eclipse.wst.common.emf.packageURIMap">
- <map
- uri="http://www.eclipse.org/emf/2002/Ecore"
- prefix="ecore">
- </map>
- <map
- uri="http://www.eclipse.org/emf/2002/Mapping"
- prefix="mapping">
- </map>
-<!-- Trick to get Mapping.xmi for MOF5 serialization -->
- <map
- uri="http://www.eclipse.org/emf/2002/Mapping"
- prefix="Mapping">
- </map>
- </extension>
-
- <extension
- point="org.eclipse.jem.util.uiContextSensitiveClass">
- <uiContextSensitiveClass
- context="Headless"
- key="rendererFactory"
- className="org.eclipse.wst.common.internal.emf.resource.EMF2DOMRendererFactory">
- </uiContextSensitiveClass>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.wst.common.emf/prepareforpii.xml b/plugins/org.eclipse.wst.common.emf/prepareforpii.xml
deleted file mode 100644
index 8007604c4..000000000
--- a/plugins/org.eclipse.wst.common.emf/prepareforpii.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<project name="PrepareForPII" default="main" basedir=".">
-
- <!-- Setup temp variables -->
- <target name="init">
- <property name="nlsDir" value="d:/NLS/Corona/0526"/>
- <property name="plugin" value="com.ibm.wtp.emf"/>
- <property name="plugindir" value="d:/workspaceCorona/${plugin}"/>
- <property name="outputDir" value="${nlsDir}/${plugin}"/>
-
-
- </target>
-
- <!-- Create the destination dir -->
- <target name="nlsDir" depends="init">
- <mkdir dir="${nlsDir}"/>
- </target>
-
- <!-- Create the destination dir -->
- <target name="plugindir" depends="nlsDir">
- <delete dir="${outputDir}"/>
- <mkdir dir="${outputDir}"/>
- </target>
-
- <!-- Move the files to the correct locations in the workspace. -->
- <target name="main" depends="plugindir">
-
- <messageIdGen folderPath = "${plugindir}" componentId = "E" />
-
- <copy todir = "${outputDir}/wtpemf" >
- <fileset dir="${plugindir}/wtpemf">
- <include name="**/*.properties"/>
- </fileset>
- </copy>
-
-
- </target>
-</project>
diff --git a/plugins/org.eclipse.wst.common.emf/schema/packageURIMap.exsd b/plugins/org.eclipse.wst.common.emf/schema/packageURIMap.exsd
deleted file mode 100644
index 4f9d9555c..000000000
--- a/plugins/org.eclipse.wst.common.emf/schema/packageURIMap.exsd
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.common.emf">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.common.emf" id="packageURIMap" name="%PackageURIMap"/>
- </appInfo>
- <documentation>
- This extension point is used to register package mappings.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="map" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="map">
- <complexType>
- <attribute name="uri" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="prefix" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- &lt;b&gt;This extension point is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.&lt;/b&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2005 IBM Corporation and others.&lt;br&gt;
-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 &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/EcoreUtilitiesPlugin.java b/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/EcoreUtilitiesPlugin.java
deleted file mode 100644
index 0f044164f..000000000
--- a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/EcoreUtilitiesPlugin.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Jun 9, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.plugin;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.wst.common.internal.emf.resource.RendererFactory;
-import org.osgi.framework.BundleContext;
-
-/**
- * @author DABERG
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class EcoreUtilitiesPlugin extends Plugin {
- public static final String ID = "org.eclipse.wst.common.emf"; //$NON-NLS-1$
-
- /**
- * @param descriptor
- */
- public EcoreUtilitiesPlugin() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugin#startup()
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- RendererFactory.setDefaultHandler(PluginRendererFactoryDefaultHandler.INSTANCE);
- PackageURIMapReader reader = new PackageURIMapReader();
- reader.processExtensions();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PackageURIMapReader.java b/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PackageURIMapReader.java
deleted file mode 100644
index 68b9fe457..000000000
--- a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PackageURIMapReader.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.plugin;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.common.internal.emf.resource.CompatibilityPackageMappingRegistry;
-
-/**
- * This reader will read the packageURIMap extension point and populate the
- * CompatibilityPackageMappingRegistry.
- *
- * The packageURIMap will have the following configuration element.
- *
- * <map prefix="somePackagePrefix" uri="somePackageURI"/>
- *
- */
-public class PackageURIMapReader {
- private static final String URI_ATT_NAME = "uri"; //$NON-NLS-1$
- private static final String PREFIX_ATT_NAME = "prefix"; //$NON-NLS-1$
- private static final String EXTENSION_POINT_NAME = "packageURIMap"; //$NON-NLS-1$
-
- /**
- *
- */
- public PackageURIMapReader() {
- super();
- }
-
- private IExtensionPoint getExtensionPoint() {
- return Platform.getExtensionRegistry().getExtensionPoint(EcoreUtilitiesPlugin.ID, EXTENSION_POINT_NAME);
- }
-
- /**
- * Call this method to read and process all of the packageURIMap extensions. *
- */
- public void processExtensions() {
- CompatibilityPackageMappingRegistry reg = CompatibilityPackageMappingRegistry.INSTANCE;
- IExtension[] extensions = getExtensionPoint().getExtensions();
- for (int i = 0; i < extensions.length; i++)
- processExtension(extensions[i], reg);
- }
-
- /**
- * @param extension
- */
- private void processExtension(IExtension extension, CompatibilityPackageMappingRegistry reg) {
- IConfigurationElement[] configs = extension.getConfigurationElements();
- for (int i = 0; i < configs.length; i++)
- processConfiguration(configs[i], reg);
- }
-
- /**
- * @param element
- */
- private void processConfiguration(IConfigurationElement element, CompatibilityPackageMappingRegistry reg) {
- String prefix = element.getAttribute(PREFIX_ATT_NAME);
- String uri = element.getAttribute(URI_ATT_NAME);
- reg.registerPrefixToPackageURI(prefix, uri);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PluginRendererFactoryDefaultHandler.java b/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PluginRendererFactoryDefaultHandler.java
deleted file mode 100644
index c24392adb..000000000
--- a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PluginRendererFactoryDefaultHandler.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Dec 1, 2003
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.plugin;
-
-import org.eclipse.jem.util.UIContextDetermination;
-import org.eclipse.wst.common.internal.emf.resource.EMF2DOMRendererFactoryDefaultHandler;
-import org.eclipse.wst.common.internal.emf.resource.RendererFactory;
-
-/**
- * @author schacher
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class PluginRendererFactoryDefaultHandler extends EMF2DOMRendererFactoryDefaultHandler {
-
- static final PluginRendererFactoryDefaultHandler INSTANCE = new PluginRendererFactoryDefaultHandler();
- static final String EXT_POINT_NAME = "rendererFactory"; //$NON-NLS-1$
-
- /**
- *
- */
- protected PluginRendererFactoryDefaultHandler() {
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.EMF2DOMRendererFactoryDefaultHandler#getDefaultRendererFactory()
- */
- public RendererFactory getDefaultRendererFactory() {
- RendererFactory aFactory = (RendererFactory) UIContextDetermination.createInstance(EXT_POINT_NAME);
- return aFactory == null ? super.getDefaultRendererFactory() : aFactory;
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AbstractRendererImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AbstractRendererImpl.java
deleted file mode 100644
index 9112aef59..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AbstractRendererImpl.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-public abstract class AbstractRendererImpl implements Renderer {
-
-
- protected TranslatorResource resource;
- private int versionId;
- private boolean validating = true;
-
- /**
- * Constructor for AbstractRendererImpl.
- */
- public AbstractRendererImpl() {
- super();
- }
-
- /**
- * @see com.ibm.etools.emf2xml.Renderer#setResource(TranslatorResource)
- */
- public void setResource(TranslatorResource aResource) {
- resource = aResource;
- }
-
- /**
- * @see com.ibm.etools.emf2xml.Renderer#getResource()
- */
- public TranslatorResource getResource() {
- return resource;
- }
-
- public int getVersionId() {
- return this.versionId;
- }
-
- public void setVersionId(int versionId) {
- this.versionId = versionId;
- }
-
- /**
- * @return
- */
- public boolean isValidating() {
- return validating;
- }
-
- /**
- * @param b
- */
- public void setValidating(boolean b) {
- validating = b;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#accessForRead()
- */
- public void accessForRead() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#accessForWrite()
- */
- public void accessForWrite() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#isModified()
- */
- public boolean isModified() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#isShared()
- */
- public boolean isShared() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#isSharedForWrite()
- */
- public boolean isSharedForWrite() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#preDelete()
- */
- public void preDelete() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#preUnload()
- */
- public void preUnload() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#releaseFromRead()
- */
- public void releaseFromRead() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#releaseFromWrite()
- */
- public void releaseFromWrite() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#setBatchMode(boolean)
- */
- public void setBatchMode(boolean isBatch) {
- }
-
- public boolean useStreamsForIO() {
- return true;
- }
-
- public boolean isBatchMode() {
- return false;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AttributeTranslatorFilter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AttributeTranslatorFilter.java
deleted file mode 100644
index b0d08696f..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AttributeTranslatorFilter.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-/*
- * Created on Sep 21, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-public final class AttributeTranslatorFilter extends TranslatorFilter {
-
- public AttributeTranslatorFilter() {
- super(null, -1);
- }
-
- public AttributeTranslatorFilter(Translator trans, int version) {
- super(trans, version);
- }
-
- public final int scanNextTranslator(Translator[] children, int start) {
- int found = start + 1;
- for (; found < children.length; ++found) {
- if (children[found].isDOMAttribute())
- break;
- }
- found = (found < children.length) ? found : -1;
- return found;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventNode.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventNode.java
deleted file mode 100644
index e57583388..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventNode.java
+++ /dev/null
@@ -1,585 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EObject;
-import org.xml.sax.Attributes;
-
-
-/**
- * CacheEventNodes (CENOs) store information collected from SAX Events. This information can then be
- * used once all necessary SAX Events have been generated to create and/or set values on EMF model
- * objects.
- *
- * CacheEventNodes (CENOs) have a simple lifecycle: initialize, collect data, commit, discard. When
- * initialized, CENOs will attempt to find the appropriate translator for a given XML element name,
- * and also create/set any necessary EMF model values. Data is collected as SAX character() events
- * are generated. On the SAX endElement event, the CENO is committed(), which is where it will
- * complete its processing to create EMF model features. In those cases where it cannot complete its
- * processing, it will defer its processing to the updateEMF() method of its parent. Defered
- * processing is necessary to handle EMF features that require read ahead cues from the XML. CENOs
- * will add themselves to their parents as children in a tree data structure. When an CENO
- * determines it is the golden piece of information required to instantiate its parent feature, it
- * will trigger its parent CENO to process the rest of the cached CENO tree. As mentioned, the
- * building of a CENO tree will only occur for nodes with read ahead cues.
- *
- * discard() is invoked by init() to ensure that no junk state is left from a previous use of the
- * CENO. commit() will call discard as needed. Because of the use of discard, CENOs can be pooled
- * and reused. If a CENO determines that it is contained in a pool, it will manage its own release
- * from that pool. Self- management is necessary because of the way in which CENOs might cache
- * certain children while waiting to create the parent EMF feature.
- *
- * @author mdelder
- */
-public class CacheEventNode {
-
- public static final String ROOT_NODE = "EMF_ROOT_NODE"; //$NON-NLS-1$
-
- private String nodeName = null;
- private Translator translator = null;
- private Notifier emfOwner = null;
- private StringBuffer buffer = null;
- private List children = null;
- private int versionID;
-
- /*
- * The internal data structure used to store the attributes is a String[]. The choice was made
- * to use an array to avoid the creation of another object (probably a Hashtable) and to exploit
- * array-access times to get the name and value of the attributes (opposed to full fledged
- * method invocations).
- *
- */
- private String[] attributes = null;
- private CacheEventNode parent = null;
- private CacheEventPool containingPool = null;
- private Boolean ignorable = null;
-
- public CacheEventNode(CacheEventPool containingPool) {
- this.containingPool = containingPool;
- }
-
- /**
- * Lifecycle method. init(TranslatorResource) will configure this Adapter as a ROOT node.
- *
- * This method will invoke discard() before completing its tasks.
- */
- public void init(TranslatorResource resource) {
- this.discard();
- this.setEmfOwner(resource);
- this.setTranslator(resource.getRootTranslator());
- this.setVersionID(resource.getVersionID());
- this.nodeName = CacheEventNode.ROOT_NODE;
- }
-
- /**
- * Lifecycle method. init(CacheEventNode, String, Attributes) will configure this Adapter to be
- * a non-ROOT node of the Adapter data structure
- *
- * This method will invoke discard() before completing its tasks.
- */
- public void init(CacheEventNode parentArg, String nodeNameArg, Attributes attributesArg) {
- this.discard();
- this.nodeName = nodeNameArg;
- init(parentArg, attributesArg);
- }
-
- private void init(CacheEventNode parentRecord, Attributes attributesArg) {
- setParent(parentRecord);
-
- setAttributes(attributesArg);
- if (parent != null) {
- /* I am not the root */
-
- /*
- * If the parent is part of the DOM Path, then we ignore it and interact with the grand
- * parent
- */
- if (parent.translator != null && parent.isInDOMPath()) {
- setParent(parent.getParent());
- }
-
- setVersionID(parent.getVersionID());
- if (parent.getEmfOwner() != null && parent.getTranslator() != null) {
-
- /* My parent had enough information to create themself */
-
- if (parent.getParent() != null) {
- setTranslator(parent.getTranslator().findChild(nodeName, parent.getEmfOwner(), getVersionID()));
-
- } else {
- setTranslator(parent.getTranslator());
- }
-
- if (this.translator == null) {
- /* Our translator is null! Ahh! Run! */
- throw new IllegalStateException("Parent Translator (" + parent.getTranslator() + //$NON-NLS-1$
- ") did not find a Child Translator for \"" + //$NON-NLS-1$
- nodeName + "\"."); //$NON-NLS-1$
- }
-
- if (this.translator.getReadAheadHelper(nodeName) == null && !this.translator.isManagedByParent()) {
- /*
- * I do not require a read ahead cue, and I am not managed by my parent so I can
- * create an instance of my EMF object
- */
-
- Notifier myEmfOwner = this.translator.createEMFObject(getNodeName(), null);
- setEmfOwner(myEmfOwner);
- this.translator.setMOFValue(parent.getEmfOwner(), myEmfOwner);
- }
- /*
- * Else I require a read ahead value or I am being managed by my parent, so I have
- * no need to create an EMF object
- */
- }
- /*
- * Else I am not mapped to the EMF stack (XML Elements found in the DOMPath are ignored)
- */
- }
- /* processAttributes is guarded and will not execute unless ready */
- processAttributes();
-
- }
-
- /**
- * commit() is invoked only if the CacheEventNode (CENO) has all the information they need and
- * should be able to determine what to do to the EMF feature.
- *
- * The commit() method will invoke discard() when it has completed its tasks, if needed. Thus,
- * after invoking this method, the CENO may have no meaningful state. If discard() is invoked,
- * all previously held reference will be released in order to be made eligible for Garbage
- * Collection.
- *
- */
- public void commit() {
-
- if (parent == null || this.isIgnorable()) {
- discard();
- releaseFromContainingPool();
- return;
- }
-
- ReadAheadHelper helper = null;
- Translator activeTranslator = getTranslator();
- Translator parentTranslator = getParent().getTranslator();
-
- if (parent != null && parent.getEmfOwner() == null) {
-
- /*
- * Not enough information yet, add the CacheEventNode to the DOM Cache tree
- */
-
- parent.appendToBuffer(this);
- if ((helper = getParent().getReadAheadHelper()) != null) {
- /*
- * If the parentRecord's emfOwner is null, then it must not be initialized therefore
- * it or one of its ancestors must require read ahead clues
- *
- * The following if statement checks if the parent is the node waiting for a
- * readAhead cue
- */
- EObject parentOwner = null;
- if (helper.nodeValueIsReadAheadName(getNodeName())) {
- /* The readAheadName is the value of the qName child node */
-
- /* We have enough information to create the EmfOwner in the parent! */
- parentOwner = parentTranslator.createEMFObject(getParent().getNodeName(), getBuffer());
-
- /*
- * Now we need to parse the cached DOM tree and update the emfOwner of the
- * parent
- */
- getParent().updateEMF(parentOwner);
-
- } else if (helper.nodeNameIsReadAheadName(getNodeName())) {
- /* The readAheadName is the actual name of the child node (qName) */
-
- /* We have enough information to create the EmfOwner in the parent! */
- parentOwner = parentTranslator.createEMFObject(getParent().getNodeName(), getNodeName());
-
- /*
- * Now we need to parse the cached DOM tree and update the emfOwner of the
- * parent
- */
- getParent().updateEMF(parentOwner);
- }
-
- } /* Else an ancestor of the parent is waiting */
-
- } else {
- if (activeTranslator != null) {
- if (activeTranslator.isManagedByParent()) {
-
- Object value = activeTranslator.convertStringToValue(getNodeName(), null, getBuffer(), getParent().getEmfOwner());
- activeTranslator.setMOFValue(getParent().getEmfOwner(), value);
- processAttributes();
- } else {
-
- activeTranslator.setTextValueIfNecessary(getBuffer(), getEmfOwner(), getVersionID());
- }
-
- }
- discard();
- releaseFromContainingPool();
- }
- }
-
- /**
- * Instruct the CacheEventNode to discard all references to make everything eligible for garbage
- * collection. This should ONLY be called after commit has succeeded. In the case of EMF
- * features that require a readAheadName, process not be completed in commit(), but rather will
- * be defered to the updateEMF() method. This method was made private specifically because it
- * could erase all information contained in the CacheEventNode before it has been processed.
- *
- */
- private void discard() {
- translator = null;
- emfOwner = null;
- buffer = null;
- if (children != null)
- children.clear();
- children = null;
- attributes = null;
- parent = null;
- }
-
- private void releaseFromContainingPool() {
- if (containingPool != null)
- containingPool.releaseNode(this);
- }
-
- public boolean isIgnorable() {
- if (ignorable == null) {
- boolean result = false;
- if (this.translator != null) {
- if (this.translator.isEmptyContentSignificant()) {
- result = false;
- } else {
- String domPath = this.translator.getDOMPath();
- result = (domPath != null) ? domPath.indexOf(this.nodeName) >= 0 : false;
- }
- }
- ignorable = result ? Boolean.TRUE : Boolean.FALSE;
- }
- return ignorable.booleanValue();
- }
-
- /**
- * Determines if a given child has a translator.
- *
- * @param childNodeName
- * the name of the current XML child node
- * @return true only if the childNodeName can be ignored (e.g. it is part of the DOM Path)
- */
- public boolean isChildIgnorable(String childNodeName) {
- boolean result = false;
-
- Translator childTranslator = null;
- if (this.getTranslator() != null) {
- childTranslator = this.getTranslator().findChild(childNodeName, this.getEmfOwner(), this.getVersionID());
-
- if (childTranslator != null) {
- if (childTranslator.isEmptyContentSignificant()) {
- result = false;
- } else {
- String temp = null;
- result = ((temp = childTranslator.getDOMPath()) != null) ? temp.indexOf(childNodeName) >= 0 : false;
- }
- }
- }
-
- return result;
- }
-
- public boolean isInDOMPath() {
- boolean result = false;
-
- if (this.getTranslator() != null) {
-
- result = this.getNodeName().equals(this.getTranslator().getDOMPath());
- }
-
- return result;
- }
-
- public String toString() {
- StringBuffer output = new StringBuffer("CacheEventNode[");//$NON-NLS-1$
- output.append("nodeName=");//$NON-NLS-1$
- output.append(nodeName);
- output.append("; translator=");//$NON-NLS-1$
- output.append(translator);
- output.append("; emfOwner=");//$NON-NLS-1$
- try {
- output.append(emfOwner);
- } catch (RuntimeException re) {
- output.append("Could not render as string!");//$NON-NLS-1$
- }
- output.append("; buffer=");//$NON-NLS-1$
- output.append(this.buffer);
- output.append("; hasChildren=");//$NON-NLS-1$
- output.append((children != null && children.size() > 0));
- if (children != null) {
- for (int i = 0; i < this.children.size(); i++) {
- output.append("\n\tchildren(");//$NON-NLS-1$
- output.append(i);
- output.append("): ");//$NON-NLS-1$
- output.append(this.children.get(i));
- }
- }
- output.append("]");//$NON-NLS-1$
- return output.toString();
- }
-
- /**
- * Updates the EMF model by creating EMF Features as necessary from the DOM Tree Cache
- *
- * @param owner
- */
- public void updateEMF(EObject owner) {
- this.setEmfOwner(owner);
- if (this.parent != null) {
- this.translator.setMOFValue((EObject) this.parent.getEmfOwner(), owner);
- this.processAttributes();
- }
-
- this.updateEMF();
- }
-
- /**
- * The translator and the owner of the parent CENO passed to this method should be nonnull
- */
- public void updateEMF() {
- if (this.children == null)
- return;
-
- CacheEventNode child = null;
- Translator childTranslator = null;
- Object value = null;
- if (this.getEmfOwner() != null) {
- Notifier parentOwner = this.getEmfOwner();
- Translator parentTranslator = this.getTranslator();
- for (int i = 0; i < this.children.size(); i++) {
-
- child = (CacheEventNode) this.children.get(i); /* Create the EMF feature */
- if (this.isChildIgnorable(child.getNodeName())) {
- this.addChildren(child.getChildren());
- } else {
- childTranslator = parentTranslator.findChild(child.getNodeName(), parentOwner, child.getVersionID());
- child.setTranslator(childTranslator);
-
- value = childTranslator.convertStringToValue(child.getNodeName(), null, child.getBuffer(), parentOwner);
- childTranslator.setMOFValue(parentOwner, value);
-
- if (childTranslator.isObjectMap()) {
- child.setEmfOwner((Notifier) value);
- childTranslator.setTextValueIfNecessary(child.getBuffer(), child.getEmfOwner(), getVersionID());
- }
-
- child.processAttributes();
- child.updateEMF(); /* update the EMF of the child */
-
- }
- child.discard();
- child.releaseFromContainingPool();
- }
- this.children = null;
- }
- }
-
- public void addChild(CacheEventNode child) {
- if (this.children == null) {
- this.children = new ArrayList();
- }
- if (parent != null && this.isIgnorable()) {
- parent.addChild(child);
- } else {
- this.children.add(child);
- }
- }
-
- protected void addChildren(List childrenArg) {
- if (this.children == null) {
- this.children = new ArrayList();
- }
- this.children.addAll(childrenArg);
- }
-
- public boolean removeChild(CacheEventNode child) {
- if (this.children == null) {
- return false;
- }
- return this.children.remove(child);
- }
-
- public List getChildren() {
- return this.children;
- }
-
- public ReadAheadHelper getReadAheadHelper() {
- if (this.translator != null && this.translator.hasReadAheadNames()) {
- return translator.getReadAheadHelper(nodeName);
- }
- return null;
- }
-
-
- /* See the documentation for the attributes field for info on how it is structured */
- public void setAttributes(Attributes attr) {
-
- /*
- * The attributes returned from the parser may be stored by reference, so we must copy them
- * over to a local data store
- */
- if (attr != null && attr.getLength() > 0) {
-
- if (this.attributes == null) {
- this.attributes = new String[attr.getLength() * 2];
- }
- for (int i = 0; i < attr.getLength(); i++) {
- this.attributes[i] = attr.getQName(i);
- this.attributes[i + attr.getLength()] = attr.getValue(i);
- }
-
- }
- }
-
- /**
- * processAttributes may be invoked multiple times. It is configured to only carry out the
- * processing one time. After it successfully completes the construction of Translators and
- * values it will discard the value of the attributes field by setting it to null.
- *
- */
- public void processAttributes() {
- /* See the documentation for the attributes field for info on how it is structured */
- if (this.attributes != null && this.attributes.length > 0) {
-
- if (this.emfOwner != null && this.translator != null) {
- Translator attrTranslator = null;
- final int limit = this.attributes.length / 2;
- Object value = null;
- for (int i = 0; i < limit; i++) {
-
- /* Find the attribute translator by using the attribute name (attributes[i]) */
- attrTranslator = this.translator.findChild(this.attributes[i], this.emfOwner, this.versionID);
-
- if (attrTranslator != null) {
-
- /*
- * Convert the value of corresponding attribute value (attributes[i+limit])
- * to a meaningful value
- */
- value = attrTranslator.convertStringToValue(this.attributes[i + limit], (EObject) this.emfOwner);
- attrTranslator.setMOFValue((EObject) this.emfOwner, value);
- }
- }
-
- /* Forget the attributes so we do not process them again */
- this.attributes = null;
- }
- }
- }
-
- /**
- * Appends data to the buffer stored by this CENO. Text will be extracted from the data array
- * begining at positiong <i>start </i> and ending at position <i>start+length </i>.
- *
- * @param data
- * @param start
- * @param length
- */
- public void appendToBuffer(char[] data, int start, int length) {
-
- if (parent != null && this.isIgnorable()) {
- parent.appendToBuffer(data, start, length);
- return;
- }
-
- if (buffer == null) {
- this.buffer = new StringBuffer();
- }
-
- /*
- * acts as a more efficient form of "append". Using this method avoids the need to copy the
- * data into its own data structure (e.g. String) before being added to the buffer
- */
- this.buffer.insert(buffer.length(), data, start, length);
-
- }
-
- /**
- * Add the given CENO as a child of this CENO.
- *
- * @param record
- */
- public void appendToBuffer(CacheEventNode record) {
-
- this.addChild(record);
- }
-
- public String getBuffer() {
- if (this.buffer == null) {
- return null;
- }
- return this.buffer.toString();
- }
-
- public Notifier getEmfOwner() {
- return emfOwner;
- }
-
- public CacheEventNode getParent() {
- return parent;
- }
-
- private void setParent(CacheEventNode record) {
- this.parent = record;
- }
-
- public Translator getTranslator() {
- return this.translator;
- }
-
- public void setEmfOwner(Notifier notifier) {
-
- this.emfOwner = notifier;
- }
-
- public void setTranslator(Translator translator) {
- this.translator = translator;
- }
-
- public String getNodeName() {
- return nodeName;
- }
-
- public int getVersionID() {
-
- if (this.parent == null) {
- try {
- return ((TranslatorResource) this.getEmfOwner()).getVersionID();
-
- } catch (RuntimeException re) {
- }
- }
- return this.versionID;
- }
-
- public void setVersionID(int i) {
- versionID = i;
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventPool.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventPool.java
deleted file mode 100644
index 55799e248..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventPool.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.xml.sax.Attributes;
-
-/**
- * Provides an instance pool of reusable CacheEventNodes. The pool will default to 10 live
- * instances. When its available instances reach five times its initial capacity, it will shrink
- * itself down to the initial capacity.
- *
- * @author mdelder
- */
-public class CacheEventPool {
-
- public static final int DEFAULT_CAPACITY = 10;
- public static final int DEFAULT_CAPACITY_INCREMENT = 25;
-
- private int poolCapacity = DEFAULT_CAPACITY;
- private CacheEventStack availablePool = null;
- private Collection inusePool = null;
-
- public CacheEventPool() {
- this(DEFAULT_CAPACITY);
- }
-
- /**
- * Create a CacheEventPOol with the given initial capacity
- *
- * @param initialCapacity
- * The number of available instances to create.
- */
- public CacheEventPool(int initialCapacity) {
- poolCapacity = (initialCapacity > 0) ? initialCapacity : DEFAULT_CAPACITY;
- availablePool = new CacheEventStack();
- inusePool = new ArrayList(poolCapacity);
- }
-
- /**
- * Create a CacheEventNode (CENO) initialized to use the given resource as its EMF Owner.
- *
- * THIS METHOD SHOULD ONLY BE USED TO CREATE ROOT NODES.
- *
- * @param resource
- * the resource that will be populated
- * @return a CacheEventNode to serve as the root.
- */
- public CacheEventNode createCacheEventNode(TranslatorResource resource) {
- CacheEventNode adapter = fetchFreeNode();
- adapter.init(resource);
- return adapter;
- }
-
- /**
- * Create child CacheEventNodes (CENOs) that will branch from the given parent.
- *
- * @param parent
- * the containing CENO
- * @param nodeName
- * The value of the XML element node name
- * @param attributes
- * The attributes that were part of the given XML element
- * @return A CENO that has been properly initialized.
- */
- public CacheEventNode createCacheEventNode(CacheEventNode parent, String nodeName, Attributes attributes) {
- CacheEventNode adapter = fetchFreeNode();
- adapter.init(parent, nodeName, attributes);
- return adapter;
- }
-
- /**
- * Release the CacheEventNode CENO back to the pool of availabe instances. This method should
- * not be invoked directly. CENOs which are acquired from a given pool will automatically
- * release themselves when necessary.
- *
- * @param adapter
- */
- public void releaseNode(CacheEventNode adapter) {
- freeNode(adapter);
- }
-
- /**
- * freezePool() should be invoked to free any unused resources. After freezePool has been
- * invoked, warmPool() will need to be invoked before the pool can be used again.
- *
- */
- public void freezePool() {
- availablePool.clear();
- availablePool = null;
- }
-
- /**
- * warmPool() must be invoked to notify the pool it is about to be used. This should occur only
- * once per document rendering. Until the pool is in use, it contains no available
- * CacheEventNodes (CENOs) in order to limit the size of the in-memory footprint of the
- * EMF2SAXWriter.
- *
- */
- public void warmPool() {
- ensureMinimumCapacity();
- }
-
- private CacheEventNode fetchFreeNode() {
- CacheEventNode result = null;
-
- if (availablePool == null || availablePool.isEmpty())
- warmPool();
-
- result = availablePool.pop();
- inusePool.add(result);
-
- return result;
- }
-
- private void freeNode(CacheEventNode adapter) {
- if (inusePool.remove(adapter))
- availablePool.push(adapter);
- //else
- // throw new IllegalStateException("Adapter not contained in pool!");
- if (availablePool.size() > (5 * poolCapacity)) {
- availablePool.clear();
- ensureMinimumCapacity();
- }
- }
-
- private void ensureMinimumCapacity() {
- if (availablePool == null) {
- availablePool = new CacheEventStack();
- }
- if (availablePool.size() < poolCapacity) {
- final int minimumCapacity = poolCapacity - availablePool.size();
- for (int i = 0; i < minimumCapacity; i++)
- availablePool.push(new CacheEventNode(this));
- }
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventStack.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventStack.java
deleted file mode 100644
index 03f419858..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventStack.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Sep 24, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.ArrayList;
-import java.util.EmptyStackException;
-
-/**
- * An unsynchronized implementation of a Stack (LIFO) data structure. No casting is required when
- * using this data structure.
- *
- * @author mdelder
- */
-public class CacheEventStack extends ArrayList {
-
- /**
- *
- * @return the top of the stack without removing it
- */
- public CacheEventNode peek() {
- if (size() == 0)
- throw new EmptyStackException();
-
- return (CacheEventNode) get(size() - 1);
- }
-
- /**
- *
- * @return the top of the stack and removing it
- */
- public CacheEventNode pop() {
- if (size() == 0)
- throw new EmptyStackException();
-
- return (CacheEventNode) remove(size() - 1);
- }
-
- /**
- *
- * @param adapter
- * A CENO to push onto the top of the stack
- */
- public void push(CacheEventNode adapter) {
- add(adapter);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityPackageMappingRegistry.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityPackageMappingRegistry.java
deleted file mode 100644
index 25367c8a1..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityPackageMappingRegistry.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * This class is used to register mappings for a package prefix to its current namespace URI. Also,
- * this registry is used to map the package
- */
-public class CompatibilityPackageMappingRegistry {
- public static CompatibilityPackageMappingRegistry INSTANCE = new CompatibilityPackageMappingRegistry();
- private Map prefixToPackageURIs = new HashMap();
- private Map packageURIsToPrefixes = new HashMap();
-
- /**
- *
- */
- private CompatibilityPackageMappingRegistry() {
- super();
- }
-
- /**
- * @return
- */
- public Map getPackageURIsToPrefixes() {
- return packageURIsToPrefixes;
- }
-
- /**
- * @return
- */
- public Map getPrefixToPackageURIs() {
- return prefixToPackageURIs;
- }
-
- public void registerPrefixToPackageURI(String prefix, String uri) {
- if (prefix != null && uri != null) {
- prefixToPackageURIs.put(prefix, uri);
- packageURIsToPrefixes.put(uri, prefix);
- }
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityResourceFactory.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityResourceFactory.java
deleted file mode 100644
index f824de384..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityResourceFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 23, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.Map;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
-
-/**
- * @author DABERG
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class CompatibilityResourceFactory extends XMIResourceFactoryImpl {
- /**
- *
- */
- public CompatibilityResourceFactory() {
- super();
- }
-
- protected Map prefixToPackageURIs;
-
- protected Map packageURIsToPrefixes;
-
- public Map getPrefixToPackageURI() {
- return CompatibilityPackageMappingRegistry.INSTANCE.getPrefixToPackageURIs();
- }
-
- public Map getPackageURIsToPrefixes() {
- return CompatibilityPackageMappingRegistry.INSTANCE.getPackageURIsToPrefixes();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl#createResource(org.eclipse.emf.common.util.URI)
- */
- public Resource createResource(URI uri) {
- return new CompatibilityXMIResourceImpl(uri);
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilitySAXXMIHandler.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilitySAXXMIHandler.java
deleted file mode 100644
index ee6ff3e9e..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilitySAXXMIHandler.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 30, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.Map;
-
-import org.eclipse.emf.ecore.xmi.XMLHelper;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-import org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler;
-
-/**
- * @author DABERG
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class CompatibilitySAXXMIHandler extends SAXXMIHandler {
- protected final static String NULL_ATTRIB = XMLResource.XSI_NS + ":null"; //$NON-NLS-1$
-
- /**
- * @param xmiResource
- * @param helper
- * @param options
- */
- public CompatibilitySAXXMIHandler(XMLResource xmiResource, XMLHelper helper, Map options) {
- super(xmiResource, helper, options);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.impl.XMLHandler#isNull()
- */
- protected boolean isNull() {
- boolean isnull = super.isNull();
- if (!isnull)
- isnull = attribs.getValue(NULL_ATTRIB) != null;
- return isnull;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityURIConverter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityURIConverter.java
deleted file mode 100644
index ba135f505..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityURIConverter.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.URIConverter;
-
-public interface CompatibilityURIConverter extends URIConverter {
- URI deNormalize(URI uri);
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMILoadImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMILoadImpl.java
deleted file mode 100644
index 5f17a46ed..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMILoadImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 30, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.xmi.XMLHelper;
-import org.eclipse.emf.ecore.xmi.impl.SAXWrapper;
-import org.eclipse.emf.ecore.xmi.impl.XMILoadImpl;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * @author DABERG
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class CompatibilityXMILoadImpl extends XMILoadImpl {
-
- /**
- * @param helper
- */
- public CompatibilityXMILoadImpl(XMLHelper helper) {
- super(helper);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl#makeDefaultHandler()
- */
- protected DefaultHandler makeDefaultHandler() {
- return new SAXWrapper(new CompatibilitySAXXMIHandler(resource, helper, options));
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMIResource.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMIResource.java
deleted file mode 100644
index a954f5fd2..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMIResource.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.xmi.XMIResource;
-
-public interface CompatibilityXMIResource extends XMIResource {
- int FORMAT_EMF1 = 0;
- /**
- * format for MOF5 compatibility; note that this can NOT be used with resources usings the
- * "platform:/plugin" protocol"
- */
- int FORMAT_MOF5 = 1;
-
- void addOriginalPackageURI(String packageUri, String originalUri);
-
- int getFormat();
-
- /**
- * Set the serialization format. By default it is FORMAT_EMF1.
- *
- * @see CompatibilityXMIResource#FORMAT_EMF1
- * @see CompatibilityXMIResource#FORMAT_MOF5
- */
- void setFormat(int format);
-
- boolean usesDefaultFormat();
-
- /**
- * @param rootObject
- */
- void removePreservingIds(EObject rootObject);
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMIResourceImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMIResourceImpl.java
deleted file mode 100644
index adc44b221..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMIResourceImpl.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.xmi.XMLHelper;
-import org.eclipse.emf.ecore.xmi.XMLLoad;
-import org.eclipse.emf.ecore.xmi.XMLSave;
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
-import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
-import org.eclipse.wst.common.internal.emf.utilities.IDUtil;
-
-
-public class CompatibilityXMIResourceImpl extends XMIResourceImpl implements CompatibilityXMIResource {
- protected static final String DEFAULT_ENCODING = "UTF-8"; //$NON-NLS-1$
- protected int format = FORMAT_EMF1;
- protected Map originalPackageURIs = new HashMap();
- private boolean preserveIDs = false;
-
- private static final String PLATFORM_PROTOCOL = "platform"; //$NON-NLS-1$
- private static final String PLATFORM_PLUGIN = "plugin"; //$NON-NLS-1$
-
- /**
- * Constructor for MappableXMIResourceImpl.
- */
- public CompatibilityXMIResourceImpl() {
- super();
- initDefaultSaveOptions();
- }
-
- public CompatibilityXMIResourceImpl(URI uri) {
- super(uri);
- initDefaultSaveOptions();
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl#createXMLHelper()
- */
- protected final XMLHelper createXMLHelper() {
- MappedXMIHelper helper = doCreateXMLHelper();
- helper.setPackageURIsToPrefixes(getPackageURIsToPrefixes());
- return helper;
- }
-
- protected MappedXMIHelper doCreateXMLHelper() {
- return new MappedXMIHelper(this, getPrefixToPackageURIs());
- }
-
- /**
- * Subclasses should not need to override this method.
- *
- * @see CompatibilityPackageMappingRegistry#getPrefixToPackageURIs()
- */
- protected Map getPrefixToPackageURIs() {
- return CompatibilityPackageMappingRegistry.INSTANCE.getPrefixToPackageURIs();
- }
-
- /**
- * Subclasses should not need to override this method.
- *
- * @see CompatibilityPackageMappingRegistry#getPrefixToPackageURIs()
- */
- protected Map getPackageURIsToPrefixes() {
- return CompatibilityPackageMappingRegistry.INSTANCE.getPackageURIsToPrefixes();
- }
-
- public void addOriginalPackageURI(String packageUri, String originalUri) {
- originalPackageURIs.put(packageUri, originalUri);
- }
-
- public int getFormat() {
- return format;
- }
-
- public void setFormat(int format) {
- if (!isPlatformPluginResourceURI())
- this.format = format;
- }
-
- private boolean isPlatformPluginResourceURI() {
- URI aURI = getURI();
-
- return aURI != null && PLATFORM_PROTOCOL.equals(uri.scheme()) && PLATFORM_PLUGIN.equals(uri.segment(0));
- }
-
- /**
- * @see org.eclipse.emf.ecore.resource.Resource#getURIFragment(EObject)
- */
- public String getURIFragment(EObject eObject) {
- if (usesDefaultFormat())
- return super.getURIFragment(eObject);
- return IDUtil.getOrAssignID(eObject, this);
- }
-
- public boolean usesDefaultFormat() {
- return format == CompatibilityXMIResource.FORMAT_EMF1;
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl#createXMLSave()
- */
- protected XMLSave createXMLSave() {
- if (usesDefaultFormat())
- return super.createXMLSave();
- return new CompatibilityXMISaveImpl(createXMLHelper());
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#doSave(OutputStream, Map)
- */
- public void doSave(OutputStream outputStream, Map options) throws IOException {
- super.doSave(outputStream, options);
- }
-
- /**
- * Method initDefaultOptions.
- */
- protected void initDefaultSaveOptions() {
- if (defaultSaveOptions == null) {
- getDefaultSaveOptions();
- }
- }
-
- /**
- * @see org.eclipse.emf.ecore.resource.impl.ResourceImpl#getEObjectByID(String)
- */
- protected EObject getEObjectByID(String id) {
- if (idToEObjectMap != null) {
- EObject eObject = (EObject) idToEObjectMap.get(id);
- if (eObject != null) {
- return eObject;
- }
- }
- return null;
- }
-
- /**
- * Called when the object is unloaded. This implementation
- * {@link InternalEObject#eSetProxyURI sets}the object to be a proxy and clears the
- * {@link #eAdapters adapters}.
- */
- protected void unloaded(InternalEObject internalEObject) {
- //overridden from the super class; call super.getURIFragment instead of the implementation
- //at this level, to avoid ID generation during unload
- //internalEObject.eSetProxyURI(uri.appendFragment(getURIFragment(internalEObject)));
- internalEObject.eSetProxyURI(uri.appendFragment(super.getURIFragment(internalEObject)));
- internalEObject.eAdapters().clear();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#doLoad(java.io.InputStream,
- * java.util.Map)
- */
- public final void doLoad(InputStream inputStream, Map options) throws IOException {
- ExtendedEcoreUtil.addLoadingTag(this);
- try {
- basicDoLoad(inputStream, options);
- } finally {
- ExtendedEcoreUtil.removeLoadingTag(this);
- }
- }
-
- protected void basicDoLoad(InputStream inputStream, Map options) throws IOException {
- super.doLoad(inputStream, options);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#init()
- */
- protected void init() {
- super.init();
- setEncoding(DEFAULT_ENCODING);
- }
-
- protected XMLLoad createXMLLoad() {
- return new CompatibilityXMILoadImpl(createXMLHelper());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.internal.emf.resource.CompatibilityXMIResource#removePreservingIds(org.eclipse.emf.ecore.EObject)
- */
- public void removePreservingIds(EObject rootObject) {
- setPreserveIDs(true);
- getContents().remove(rootObject);
- }
-
- /**
- * @return Returns the preserveIDs.
- */
- public boolean isPreserveIDs() {
- return preserveIDs;
- }
-
- /**
- * @param preserveIDs
- * The preserveIDs to set.
- */
- public void setPreserveIDs(boolean preserveIDs) {
- this.preserveIDs = preserveIDs;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#detachedHelper(org.eclipse.emf.ecore.EObject)
- */
- protected void detachedHelper(EObject eObject) {
- if (modificationTrackingAdapter != null) {
- eObject.eAdapters().remove(modificationTrackingAdapter);
- }
-
- if (useUUIDs()) {
- DETACHED_EOBJECT_TO_ID_MAP.put(eObject, getID(eObject));
- }
-
- if (!isPreserveIDs() && idToEObjectMap != null && eObjectToIDMap != null) {
- idToEObjectMap.remove(eObjectToIDMap.remove(eObject));
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMISaveImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMISaveImpl.java
deleted file mode 100644
index c1a7bf291..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMISaveImpl.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.Map;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.xmi.XMIResource;
-import org.eclipse.emf.ecore.xmi.XMLHelper;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-import org.eclipse.emf.ecore.xmi.impl.XMISaveImpl;
-
-public class CompatibilityXMISaveImpl extends XMISaveImpl {
-
- /**
- * Constructor for CompatibilityXMISaveImpl.
- *
- * @param helper
- */
- public CompatibilityXMISaveImpl(XMLHelper helper) {
- super(helper);
- }
-
- /**
- * Constructor for CompatibilityXMISaveImpl.
- *
- * @param options
- * @param helper
- * @param encoding
- */
- public CompatibilityXMISaveImpl(Map options, XMLHelper helper, String encoding) {
- super(options, helper, encoding);
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMISaveImpl#init(XMLResource, Map)
- */
- protected void init(XMLResource resource, Map options) {
- super.init(resource, options);
- xmiType = true;
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMISaveImpl#addNamespaceDeclarations()
- */
- public void addNamespaceDeclarations() {
- doc.addAttribute(XMI_VER_NS, XMIResource.VERSION_VALUE);
- doc.addAttribute(XMI_XMLNS, XMIResource.XMI_URI);
- EPackage[] packages = helper.packages();
- StringBuffer xsiSchemaLocation = null;
- if (declareSchemaLocation) {
- for (int i = 0; i < packages.length; i++) {
- EPackage ePackage = packages[i];
-
- EObject root = EcoreUtil.getRootContainer(ePackage);
- if (root instanceof EPackage) {
- EPackage rootEPackage = (EPackage) root;
- Resource resource = rootEPackage.eResource();
- if (resource != null) {
- URI uri = resource.getURI();
- String rootNsURI = rootEPackage.getNsURI();
- if (uri == null ? rootNsURI != null : !uri.toString().equals(rootNsURI)) {
- declareXSI = true;
- if (xsiSchemaLocation == null) {
- xsiSchemaLocation = new StringBuffer();
- } else {
- xsiSchemaLocation.append(' ');
- }
- xsiSchemaLocation.append(rootNsURI);
- xsiSchemaLocation.append(' ');
- xsiSchemaLocation.append(helper.getHREF(rootEPackage));
- }
- }
- }
- }
- }
-
- if (declareXSI) {
- doc.addAttribute(XSI_XMLNS, XMLResource.XSI_URI);
- }
-
- for (int i = 0; i < packages.length; i++) {
- EPackage ePackage = packages[i];
- //Modified from superclass - dispatch back to helper for compatibility
- //String nsURI = ePackage.getNsURI();
- //String nsPrefix = ePackage.getNsPrefix();
- String[] nsInfo = ((MappedXMIHelper) helper).getNSInfo(ePackage);
- doc.addAttributeNS(XMLResource.XML_NS, nsInfo[0], nsInfo[1]);
- }
-
- if (xsiSchemaLocation != null) {
- doc.addAttribute(XSI_SCHEMA_LOCATION, xsiSchemaLocation.toString());
- }
- }
-
- protected void saveHref(EObject remote, EStructuralFeature f) {
- String name = helper.getQName(f);
- String href = helper.getHREF(remote);
- if (href != null) {
- doc.startElement(name);
- EClass eClass = remote.eClass();
-
- EClass expectedType = (EClass) f.getEType();
- //Changed next line to always write type if expectedType
- //is different from eClass
- if (eClass != expectedType) {
- saveTypeAttribute(eClass);
- }
-
- doc.addAttribute(XMLResource.HREF, href);
- doc.endEmptyElement();
- }
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ConstantAttributeTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ConstantAttributeTranslator.java
deleted file mode 100644
index 356f102d4..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ConstantAttributeTranslator.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 15, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * @author schacher
- */
-public class ConstantAttributeTranslator extends Translator {
-
- protected String attributeValue;
-
- /**
- * @param domNameAndPath
- * @param eClass
- */
- public ConstantAttributeTranslator(String domNameAndPath, String attributeValue) {
- super(domNameAndPath, null, DOM_ATTRIBUTE);
- this.attributeValue = attributeValue;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#getMOFValue(org.eclipse.emf.ecore.EObject)
- */
- public Object getMOFValue(EObject mofObject) {
- return attributeValue;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#isSetMOFValue(org.eclipse.emf.ecore.EObject)
- */
- public boolean isSetMOFValue(EObject emfObject) {
- return true;
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/DefaultTranslatorFactory.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/DefaultTranslatorFactory.java
deleted file mode 100644
index 7518472fc..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/DefaultTranslatorFactory.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Aug 20, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.wst.common.internal.emf.utilities.Namespace;
-import org.eclipse.wst.common.internal.emf.utilities.NamespaceAdapter;
-
-
-/**
- * @author schacher
- */
-public class DefaultTranslatorFactory implements VariableTranslatorFactory {
-
- public static final String XMLNS = "xmlns:"; //$NON-NLS-1$
- public static final DefaultTranslatorFactory INSTANCE = new DefaultTranslatorFactory();
-
- public DefaultTranslatorFactory() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.VariableTranslatorFactory#accepts(java.lang.String)
- */
- public boolean accepts(String domName) {
- return domName != null && domName.startsWith(XMLNS);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.VariableTranslatorFactory#accepts(org.eclipse.emf.common.notify.Notification)
- */
- public boolean accepts(Notification notif) {
- return notif.getFeature() == NamespaceAdapter.NOTIFICATION_FEATURE;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.VariableTranslatorFactory#create(java.lang.String)
- */
- public Translator create(String domName) {
- return new NamespaceTranslator(domName);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.VariableTranslatorFactory#create(org.eclipse.emf.ecore.EObject)
- */
- public List create(Notifier target) {
- if (!(target instanceof EObject))
- return null;
- List namespaces = NamespaceAdapter.getNamespaces((EObject) target);
- if (namespaces == null || namespaces.isEmpty())
- return null;
- List result = new ArrayList(namespaces.size());
- for (int i = 0; i < namespaces.size(); i++) {
- result.add(create((Namespace) namespaces.get(i)));
- }
- return result;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.VariableTranslatorFactory#create(org.eclipse.emf.common.notify.Notification)
- */
- public Translator create(Notification notif) {
- Namespace ns = (Namespace) notif.getNewValue();
- return create(ns);
- }
-
- private Translator create(Namespace ns) {
- return new NamespaceTranslator(XMLNS + ns.getPrefix());
- }
-
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/DependencyTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/DependencyTranslator.java
deleted file mode 100644
index c7d1c6257..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/DependencyTranslator.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 25, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * @author schacher
- */
-public class DependencyTranslator extends Translator {
-
- /**
- * @param domNameAndPath
- * @param aFeature
- */
- public DependencyTranslator(String domNameAndPath, EStructuralFeature aFeature, EStructuralFeature aDependentFeature) {
- super(domNameAndPath, aFeature);
- dependencyFeature = aDependentFeature;
- }
-
- public EObject getChild(EObject parent) {
- EObject child = basicGetDependencyObject(parent);
- if (child == null)
- return createChild(parent);
- return child;
- }
-
-
- protected EObject createChild(EObject parent) {
- EObject child = createEMFObject(dependencyFeature);
- parent.eSet(dependencyFeature, child);
- return child;
- }
-
- public List getMOFChildren(EObject mofObject) {
- //return super.getMOFChildren(getChild(mofObject));
- return super.getMOFChildren(mofObject);
- }
-
- public Object getMOFValue(EObject mofObject) {
- return super.getMOFValue(getChild(mofObject));
- }
-
- public void setMOFValue(EObject emfObject, Object value) {
- //super.setMOFValue(getChild(emfObject), value);
- super.setMOFValue(getChild(emfObject), value, -1);
- }
-
- public void setMOFValue(Notifier owner, Object value, int newIndex) {
- super.setMOFValue(getChild((EObject) owner), value, newIndex);
- }
-
- public void removeMOFValue(Notifier owner, Object value) {
- super.removeMOFValue(getChild((EObject) owner), value);
- }
-
- public boolean isSetMOFValue(EObject emfObject) {
- return super.isSetMOFValue(getChild(emfObject));
- }
-
- public void unSetMOFValue(EObject emfObject) {
- super.unSetMOFValue(getChild(emfObject));
- }
-
-
- public boolean isDependencyChild() {
- return true;
- }
-
- public boolean featureExists(EObject emfObject) {
- return super.featureExists(getChild(emfObject));
- }
-
- public void clearList(EObject mofObject) {
- super.clearList(getChild(mofObject));
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapter.java
deleted file mode 100644
index 9782ea143..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapter.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.ecore.EObject;
-import org.w3c.dom.Node;
-
-public interface EMF2DOMAdapter extends Adapter {
-
-
- Class ADAPTER_CLASS = EMF2DOMAdapter.class;
-
- /**
- * Return the DOM node that the target of this adapter maps to. If the target MOF object maps to
- * more than one DOM node, this node is the top-most node.
- */
- Node getNode();
-
- void setNode(Node aNode);
-
- /**
- * Set to false and notification of changes from both the DOM node and the MOF object will be
- * ignored.
- */
- boolean isNotificationEnabled();
-
- /**
- * Set to false and notification of changes from both the DOM node and the MOF object will be
- * ignored.
- */
- void setNotificationEnabled(boolean isEnabled);
-
- /**
- * Updates the DOM tree for this adapter from the current values of the MOF Object. This method
- * updates ALL the DOM nodes from all the MOF attributes.
- */
- void updateDOM();
-
- /**
- * Updates the MOF Object from the DOM tree. All the children of the DOM tree are updated into
- * the MOF object.
- */
- void updateMOF();
-
- public void updateDOMFeature(Translator map, Node node, EObject mofObject);
-
- public void updateMOFFeature(Translator map, Node node, EObject mofObject);
-
- EObject getEObject();
-
- /**
- * Return true if MOF object is a proxy.
- */
- boolean isMOFProxy();
-
- /**
- * Remove the DOM adapters from the node AND all its child nodes, recursively.
- */
- void removeAdapters(Node node);
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java
deleted file mode 100644
index b36737fe5..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java
+++ /dev/null
@@ -1,1743 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.wst.common.internal.emf.utilities.Assert;
-import org.eclipse.wst.common.internal.emf.utilities.DOMUtilities;
-import org.eclipse.wst.common.internal.emf.utilities.EtoolsCopySession;
-import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
-import org.eclipse.wst.common.internal.emf.utilities.FeatureValueConversionException;
-import org.eclipse.wst.common.internal.emf.utilities.Revisit;
-import org.eclipse.wst.common.internal.emf.utilities.StringUtil;
-import org.eclipse.wst.common.internal.emf.utilities.WFTUtilsResourceHandler;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-
-public class EMF2DOMAdapterImpl extends AdapterImpl implements EMF2DOMAdapter {
-
- final protected static boolean fDebug = false;
-
- protected boolean fNotificationEnabled = true;
-
- protected Node fNode;
-
- protected Translator fTranslator;
-
- protected EMF2DOMRenderer fRenderer;
-
- protected Translator[] childTranslators;
-
- protected boolean isRoot = false;
-
- private class DependencyAdapter extends org.eclipse.emf.common.notify.impl.AdapterImpl {
-
- static final String KEY = "EMF2DOMDependencyAdapter"; //$NON-NLS-1$
-
- public void notifyChanged(Notification msg) {
- EMF2DOMAdapterImpl.this.notifyChanged(msg);
- }
-
- /**
- * @see org.eclipse.emf.common.notify.impl.AdapterImpl#isAdapterForType(Object)
- */
- public boolean isAdapterForType(Object type) {
- return KEY.equals(type);
- }
- }
-
- /**
- * Constructor for root adapters.
- */
- public EMF2DOMAdapterImpl(TranslatorResource resource, Document document, EMF2DOMRenderer renderer, Translator translator) {
- this((Notifier) resource, (Node) document, renderer, translator);
- isRoot = true;
- }
-
- /**
- * Construct an Adapter given an EObject and a node
- */
- public EMF2DOMAdapterImpl(Notifier object, Node node, EMF2DOMRenderer renderer, Translator translator) {
- super();
- setTarget(object);
- fNode = node;
- fRenderer = renderer;
- fTranslator = translator;
- initChildTranslators();
- addEMFAdapter();
- addDOMAdapter();
- addDependencyAdapterIfNecessary();
- }
-
- /**
- * Construct an adapter from a DOM Node. The EObject will be created
- */
- public EMF2DOMAdapterImpl(Node node, EMF2DOMRenderer renderer, Translator translator) {
- fNode = node;
- fRenderer = renderer;
- fTranslator = translator;
- setTargetFromNode();
- initChildTranslators();
- addEMFAdapter();
- addDOMAdapter();
- addDependencyAdapterIfNecessary();
-
- }
-
- protected void addDependencyAdapterIfNecessary() {
- if (!fTranslator.isDependencyParent())
- return;
- EObject child = fTranslator.basicGetDependencyObject(getEObject());
- if (child != null)
- addDependencyAdapter(child);
- }
-
- protected void initChildTranslators() {
-
- List children = new ArrayList();
- children.addAll(Arrays.asList(fTranslator.getChildren(getTarget(), fRenderer.getVersionID())));
-
- VariableTranslatorFactory factory = fTranslator.getVariableTranslatorFactory();
- if (factory != null) {
- String domName = null;
- NamedNodeMap map = fNode.getAttributes();
-
- if (map != null) {
- int length = map.getLength();
- for (int i = 0; i < length; i++) {
- Node attrNode = map.item(i);
- domName = attrNode.getNodeName();
- //Handle variable translators
- Translator t = fTranslator.findChild(domName, getTarget(), fRenderer.getVersionID());
- if (t != null && !children.contains(t))
- children.add(t);
- }
- }
- List childrenFromEMF = factory.create(getTarget());
- if (childrenFromEMF != null)
- children.addAll(childrenFromEMF);
- }
-
- childTranslators = (Translator[]) children.toArray(new Translator[children.size()]);
- }
-
- /**
- * Set to false and notification of changes from both the DOM node and the MOF object will be
- * ignored.
- */
- public boolean isNotificationEnabled() {
- return fNotificationEnabled;
- }
-
- /**
- * Set to false and notification of changes from both the DOM node and the MOF object will be
- * ignored.
- */
- public void setNotificationEnabled(boolean isEnabled) {
- fNotificationEnabled = isEnabled;
- }
-
- public boolean isAdapterForType(Object type) {
- return EMF2DOMAdapter.ADAPTER_CLASS == type;
- }
-
- protected void addEMFAdapter() {
- target.eAdapters().add(this);
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append(shortClassName(this));
- sb.append('(');
- sb.append(getNode().getNodeName());
- sb.append(',');
- sb.append(shortClassName(getTarget()));
- sb.append(')');
- return sb.toString();
- }
-
- protected String shortClassName(Object o) {
- String cn = o.getClass().getName();
- int i = cn.lastIndexOf('.');
- return cn.substring(i + 1, cn.length());
- }
-
- /*
- * Prints out a MOF notification for debugging
- */
- protected void debugMOFNotify(Notification msg) {
- if (fDebug) {
- String notifType = ""; //$NON-NLS-1$
- switch (msg.getEventType()) {
- case Notification.ADD :
- notifType = "ADD"; //$NON-NLS-1$
- break;
- case Notification.REMOVE :
- notifType = "REMOVE"; //$NON-NLS-1$
- break;
- case Notification.ADD_MANY :
- notifType = "ADD_MANY"; //$NON-NLS-1$
- break;
- case Notification.REMOVE_MANY :
- notifType = "REMOVE_MANY"; //$NON-NLS-1$
- break;
- case Notification.SET : {
- if (msg.getPosition() == Notification.NO_INDEX)
- notifType = "REPLACE"; //$NON-NLS-1$
- else
- notifType = "SET"; //$NON-NLS-1$
- break;
- }
- case Notification.UNSET :
- notifType = "UNSET"; //$NON-NLS-1$
- break;
- }
-
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("MOF Change: " + notifType); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tnotifier : " + msg.getNotifier()); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tchangedFeature: " + msg.getFeature()); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\toldValue : " + msg.getOldValue()); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tnewValue : " + msg.getNewValue()); //$NON-NLS-1$
- }
- }
-
- /*
- * Override this method to create the feature maps for the adapter.
- */
- protected Translator[] getChildTranslators() {
- return childTranslators;
- }
-
- protected Translator findTranslator(Notification not) {
- if (not.getFeature() == null)
- return null;
- Translator[] maps = getChildTranslators();
- for (int i = 0; i < maps.length; i++) {
- if (maps[i].isMapFor(not.getFeature(), not.getOldValue(), not.getNewValue()))
- return maps[i];
- }
- return null;
- }
-
- /**
- * Update all the children of the target MOF object in the relationship described by
- *
- * @map.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator Describes the mapping from the MOF
- * attribute name to the DOM node name
- */
- protected void primUpdateDOMMultiFeature(Translator map, Node node, List mofChildren, List domChildren, Notifier owner) {
-
- //Used for inserting primitives
- List inorderDOMChildren = null;
- if (!map.isObjectMap() || map.isManagedByParent()) {
- inorderDOMChildren = new ArrayList();
- inorderDOMChildren.addAll(domChildren);
- }
- Node parent = findDOMPath(node, map, false);
-
- // Go though the MOF children checking to see if the corresponding
- // MOF Adapter children exists. If not, create the adapter.
- // Also handles reordering children that have moved.
- int i = 0;
- for (; i < mofChildren.size(); i++) {
- Object child = mofChildren.get(i);
- EObject mofChild = null;
-
- EMF2DOMAdapter adapter = null;
-
- // Check to see if the child is a MOF Object.
- if (!map.isManagedByParent() && child instanceof EObject) {
- mofChild = (EObject) mofChildren.get(i);
- adapter = getExistingAdapter(mofChild);
- }
-
- if (adapter != null && i < domChildren.size() && domChildren.get(i) == adapter.getNode())
- continue;
- if (adapter != null) {
- if (domChildren.isEmpty())
- continue;
- // A node has been reordered in the list
- Node reorderNode = adapter.getNode();
- Node insertBeforeNode = (Node) domChildren.get(i);
- domChildren.remove(reorderNode);
- domChildren.add(i, reorderNode);
- if (reorderNode != insertBeforeNode) {
- reorderDOMChild(parent, reorderNode, insertBeforeNode, map);
- }
- } else {
- // A new node has been added, create it
- parent = createDOMPath(node, map);
- if (mofChild != null) {
- adapter = createAdapter(mofChild, map);
- Node newNode = adapter.getNode();
- Node insertBeforeNode = findInsertBeforeNode(parent, map, mofChildren, i, domChildren);
- DOMUtilities.insertBeforeNodeAndWhitespace(parent, newNode, insertBeforeNode);
- domChildren.add(i, newNode);
- boolean notificationFlag = adapter.isNotificationEnabled();
- adapter.setNotificationEnabled(false);
- try {
- indent(newNode, map);
- } finally {
- adapter.setNotificationEnabled(notificationFlag);
- }
- adapter.updateDOM();
- } else {
- // The mof feature is a collection of primitives.
- // create a new dom node and listen to it.
- Element newNode = createNewNode(null, map);
- Node insertBeforeNode = findInsertBeforeNode(parent, map, mofChildren, i, inorderDOMChildren);
- DOMUtilities.insertBeforeNodeAndWhitespace(parent, newNode, insertBeforeNode);
- indent(newNode, map);
- addDOMAdapter(newNode); // Hook up listeners
- domChildren.add(i, newNode);
- inorderDOMChildren.add(newNode);
- Text newText = parent.getOwnerDocument().createTextNode(map.convertValueToString(child, (EObject) owner));
- DOMUtilities.insertBeforeNode(newNode, newText, null);
- }
- }
- }
-
- // Remove any remaining adapters.
- for (; i < domChildren.size(); i++) {
- removeDOMChild(parent, (Element) domChildren.get(i));
- }
-
- // If there are no MOF children, remove any unnecessary DOM node paths
- if (mofChildren.size() == 0 && map.hasDOMPath()) {
- if (map.shouldRenderEmptyDOMPath((EObject) owner))
- createDOMPath(node, map);
- else
- removeDOMPath(node, map);
- }
-
- }
-
- /**
- * Update all the children of the target MOF object in the relationship described by
- *
- * @map.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator Describes the mapping from the MOF
- * attribute name to the DOM node name
- */
- protected void primUpdateMOFMultiFeature(Translator map, Node node, List mofChildren, List domChilren) {
-
- Hashtable nodeToAdapter = new Hashtable();
-
- for (int i = 0; i < mofChildren.size(); i++) {
- EMF2DOMAdapter adapter = getExistingAdapter((EObject) mofChildren.get(i));
- if (adapter != null)
- nodeToAdapter.put(adapter.getNode(), adapter);
- }
-
- // Go though the DOM children checking to see if the corresponding
- // MOF Adapter children exists. If not, create the adapter.
- // Also handles reordering children that have moved.
- int i = 0;
- int mofIndex = 0;
- List adaptersToUpdate = new ArrayList();
- for (; i < domChilren.size(); i++) {
- Element childNode = (Element) domChilren.get(i);
- EMF2DOMAdapter adapter = i < mofChildren.size() ? getExistingAdapter((EObject) mofChildren.get(i)) : null;
- if (adapter != null && !adapter.isMOFProxy() && adapter.getNode() == childNode) {
- // Because the adapter is processing STRUCTURE_CHANGED from the
- // DOM, we
- // must update all the way down the tree since anything under
- // the notifying
- // DOM node could have changed.
- adapter.updateMOF();
- mofIndex++;
- continue;
- }
-
- adapter = (EMF2DOMAdapter) nodeToAdapter.get(childNode);
- if (adapter != null) {
- reorderIfNecessary((EList) mofChildren, adapter.getEObject(), mofIndex);
- mofIndex++;
- } else {
- adapter = createAdapter(childNode, map);
- if (adapter != null) {
- try {
- //We don't want to push anything back to the child dom
- adapter.setNotificationEnabled(false);
- map.setMOFValue(getTarget(), adapter.getTarget(), mofIndex);
- } finally {
- adapter.setNotificationEnabled(true);
- }
-
- adaptersToUpdate.add(adapter);
- mofIndex++;
- }
- }
- }
-
- // Remove any remaining adapters.
- for (; i < mofChildren.size();) {
- removeMOFValue((EObject) mofChildren.get(i), map);
- }
-
- // The adapters cannot be updated as they created. We must wait until
- // all of the adapters are created and removed before updating,
- // otherwise
- // we can get in a state where there are adapters fighting with
- // eachother
- // (one for the old node and one for the new node).
- for (int j = 0; j < adaptersToUpdate.size(); j++) {
- ((EMF2DOMAdapter) adaptersToUpdate.get(j)).updateMOF();
- }
- }
-
- /**
- * Removes a feature's value.
- *
- * @param childAdapter
- * com.ibm.etools.mof2dom.EMF2DOMAdapter The child to remove
- * @param mofAttributeName
- * String The name of the mofAttribute to remove the child from.
- */
- protected void removeMOFValue(EObject value, Translator translator) {
-
- if (value == null)
- return;
-
- EMF2DOMAdapter adapter = (EMF2DOMAdapter) EcoreUtil.getExistingAdapter(value, EMF2DOMAdapter.ADAPTER_CLASS);
- if (adapter != null) {
- // Remove the adapter from BOTH the MOF Object and the DOM Nodes
- value.eAdapters().remove(adapter);
- removeAdapters(adapter.getNode());
- }
-
- EStructuralFeature feature = translator.getFeature();
- boolean doUnload = feature == null || (translator.isObjectMap() && ((EReference) feature).isContainment());
-
- // translator.removeMOFValue() was here originally
-
- // Unload the objects.
- if (doUnload)
- ExtendedEcoreUtil.unload(value);
-
- // Remove the MOF value
- translator.removeMOFValue(getTarget(), value);
- }
-
- protected void reorderIfNecessary(EList emfChildren, EObject eObj, int emfIndex) {
- int currIndex = emfChildren.indexOf(eObj);
- if (currIndex > -1 && currIndex != emfIndex)
- emfChildren.move(emfIndex, eObj);
- }
-
- /**
- * default is to do nothing; subclasses can override
- */
- protected void indent(Node newNode, Translator map) {
-
- }
-
- protected Node findInsertBeforeNode(Node parentNode, Translator map, List mofList, int mofInx, List domList) {
- Node insertBeforeNode = null;
-
- // If there are no current dom children for this map, find the initial
- // insert pos.
- if (domList.size() == 0)
- return findInitialInsertBeforeNode(parentNode, map);
-
- // If some dom nodes then find the correct one to insert before.
- int i = mofInx + 1;
- while (i < mofList.size() && insertBeforeNode == null) {
- // Start at the mofInx passed in and look forward for the first
- // adapted
- // MOF object. Use that node as the insert before node.
- Object o = mofList.get(i);
- if (!map.isObjectMap() || map.isManagedByParent())
- break;
- EObject tMOFObject = (EObject) o;
- EMF2DOMAdapter tAdapter = (EMF2DOMAdapter) EcoreUtil.getExistingAdapter(tMOFObject, EMF2DOMAdapter.ADAPTER_CLASS);
- if (tAdapter != null) {
- insertBeforeNode = tAdapter.getNode();
- }
- i++;
- }
-
- // Handle inserting at the end of the list
- if (insertBeforeNode == null)
- insertBeforeNode = DOMUtilities.getNextNodeSibling((Node) domList.get(domList.size() - 1));
- if (insertBeforeNode == null)
- insertBeforeNode = ((Node) domList.get(domList.size() - 1)).getNextSibling();
-
- return insertBeforeNode;
- }
-
- protected Node findInitialInsertBeforeNode(Node parentNode, Translator mapNode) {
- Translator[] maps = getChildTranslators();
-
- // First, skip past all the maps in the ordered collection
- // of maps. We want to begin the search with this node.
- int i = 0;
- for (; i < maps.length; i++) {
- if (maps[i] == mapNode)
- break;
- }
-
- // Now search go through each map node until a child node matching
- // its DOM name is found.
- Node insertBeforeNode = null;
- for (int j = i; j < maps.length && insertBeforeNode == null; j++) {
- NodeList childNodes = parentNode.getChildNodes();
- Translator nodeToFindMap = maps[j];
- for (int k = 0; k < childNodes.getLength(); k++) {
- Node node = childNodes.item(k);
- if (nodeToFindMap.isMapFor(node.getNodeName())) {
- insertBeforeNode = node;
- break;
- }
- }
- }
- return insertBeforeNode;
- }
-
- /*
- * Traverses the path that <map> specifies. Returns the last node of the path that was able to
- * be traversed or null if the path could not be traversed. The <addAdapters> boolean is used to
- * determine if the receiver is added as an adapter to every node found on the path.
- */
- protected Node findDOMPath(Node parent, Translator map, boolean addAdapters) {
-
- String path = map.getDOMPath();
- Node curNode = parent;
- Iterator iter = DOMUtilities.createPathIterator(path);
-
- while (curNode != null && iter.hasNext()) {
- String nodeName = (String) iter.next();
- curNode = DOMUtilities.getNodeChild(curNode, nodeName);
- if (addAdapters && curNode != null) {
- addDOMAdapter(curNode);
- }
- }
- return curNode;
- }
-
- /**
- * Return the list of DOM node children that currently exist with the specified tagname.
- */
- protected List getDOMChildren(Node node, Translator map) {
- Node parent = findDOMPath(node, map, true);
- if (parent != null)
- return DOMUtilities.getNodeChildren(parent, map.getDOMNames());
- return new ArrayList();
- }
-
- protected EMF2DOMAdapter getExistingAdapter(EObject refObject) {
- EMF2DOMAdapter adapter = (EMF2DOMAdapter) EcoreUtil.getExistingAdapter(refObject, EMF2DOMAdapter.ADAPTER_CLASS);
- if (adapter != null && adapter.isMOFProxy()) {
- refObject.eAdapters().remove(adapter);
- removeDOMAdapter(adapter.getNode(), adapter);
- adapter = null;
- }
- return adapter;
- }
-
- protected void primAddDOMAdapter(Node aNode, EMF2DOMAdapter anAdapter) {
- fRenderer.registerDOMAdapter(aNode, anAdapter);
- }
-
- protected EMF2DOMAdapter primGetExistingAdapter(Node aNode) {
- return fRenderer.getExistingDOMAdapter(aNode);
- }
-
- protected void removeDOMAdapter(Node aNode, EMF2DOMAdapter anAdapter) {
- fRenderer.removeDOMAdapter(aNode, anAdapter);
- }
-
- protected void addDOMAdapter(Node childNode) {
-
- // Only add the adapter if this is an child node that will not be
- // adapted. For instance a subtree that maps to a MOF attribute
- // setting.
- if (childNode.getNodeType() == Node.ELEMENT_NODE) {
- EMF2DOMAdapter attrAdapter = primGetExistingAdapter(childNode);
-
- if (attrAdapter == null || attrAdapter.getNode() != getNode()) {
- // If the node is adapted, but not by this adapter then remove
- // it. This happens to non-object children when the parent tag
- // name is changed.
- removeDOMAdapter(childNode, attrAdapter);
-
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tCHILD: Adding DOM adapter: " + this); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\t\tto: " + childNode); //$NON-NLS-1$
- }
- primAddDOMAdapter(childNode, this);
- }
- }
- }
-
- /**
- * Reorder a child before a given node
- */
- protected void reorderDOMChild(Node parentNode, Node childNode, Node insertBeforeNode, Translator map) {
- try {
- removeDOMChild(parentNode, childNode, false);
- parentNode.insertBefore(childNode, insertBeforeNode);
- } catch (Throwable e) {
- e.printStackTrace();
- }
- }
-
- protected String getNewlineString(Node node) {
- return DOMUtilities.NEWLINE_STRING;
- }
-
- protected String primGetIndentString(Node node) {
- return DOMUtilities.getIndentString(node);
- }
-
- /**
- * Remove a child node
- */
- protected void removeDOMChild(Node parentNode, Node childNode) {
- removeDOMChild(parentNode, childNode, true);
- }
-
- /**
- * Remove a child node
- */
- protected void removeDOMChild(Node parentNode, Node childNode, boolean removeAdapter) {
- try {
- if (childNode == null)
- return;
- // Look for any whitespace preceeding the node being
- // removed and remove it as well.
- Text prevText = DOMUtilities.getPreviousTextSibling(childNode);
- if (prevText != null && DOMUtilities.isWhitespace(prevText)) {
- parentNode.removeChild(prevText);
- }
- // Remove the node.
- if (removeAdapter)
- removeAdapters(childNode);
- parentNode.removeChild(childNode);
- } catch (Throwable e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Remove the DOM adapters from the node AND all its child nodes, recursively.
- */
- public void removeAdapters(Node node) {
- EMF2DOMAdapter adapter = primGetExistingAdapter(node);
- if (adapter != null) {
- // Remove the adapter from both the DOM node and the MOF Object.
- removeDOMAdapter(node, adapter);
- if (adapter.getNode() == node) {
- Notifier localTarget = adapter.getTarget();
- if (localTarget != null)
- localTarget.eAdapters().remove(adapter);
- }
- }
-
- NodeList nl = node.getChildNodes();
- for (int i = 0; i < nl.getLength(); i++) {
- Node n = nl.item(i);
- removeAdapters(n);
- }
- }
-
- /**
- * Creates the path specified by <map>under <node>. Only the portion of the path that does not
- * exist (if any) is created
- *
- * @param node
- * org.w3c.dom.Node
- * @param map
- * com.ibm.etools.mof2dom.Translator
- */
- protected Node createDOMPath(Node node, Translator map) {
- Iterator i = DOMUtilities.createPathIterator(map.getDOMPath());
- Node curNode = node;
- while (i.hasNext()) {
- String nodeName = (String) i.next();
- curNode = findOrCreateNode(node, map, nodeName);
- }
- return curNode;
- }
-
- protected Element findOrCreateNode(Node parent, Translator map, String segment) {
- Node node = DOMUtilities.getNodeChild(parent, segment);
- if (node == null) {
- // The node did not already exist, create it.
- Document doc = parent.getOwnerDocument();
- node = doc.createElement(segment);
- if (map.isEmptyTag())
- setEmptyTag((Element) node);
-
- Node insertBeforeNode = findInitialInsertBeforeNode(parent, map);
- DOMUtilities.insertBeforeNodeAndWhitespace(parent, node, insertBeforeNode);
- indent(node, map);
- addDOMAdapter(node); // Hook up listeners
- }
- return (Element) node;
- }
-
- /**
- * Remove the node passed in if it has only whitespace nodes as children
- *
- * @param node
- * org.w3c.dom.Node The node to check
- */
- protected void removeIfEmpty(Node node) {
- NodeList nl = node.getChildNodes();
-
- // Run through all the nodes children. If a non-whitespace node
- // pis found, bail.
- for (int i = 0; i < nl.getLength(); i++) {
- Node childNode = nl.item(i);
- if (!DOMUtilities.isWhitespace(childNode))
- return;
- }
-
- // We only get here if there are no non-whitespace chars, so
- // simply remove the node.
- removeDOMChild(node.getParentNode(), node);
- }
-
- /**
- * Remove the DOM path specified by <map>from <node>
- */
- protected void removeDOMPath(Node node, Translator map) {
- Node childNode = findDOMPath(node, map, false);
- while (childNode != null && childNode != node) {
- removeIfEmpty(childNode);
- childNode = childNode.getParentNode();
- }
- }
-
- /**
- * Create an adapter for a child DOM node
- *
- * @param node
- * org.w3c.dom.Node The node to create the adapter for.
- */
- protected EMF2DOMAdapter createAdapter(EObject mofObject, Translator childMap) {
- // Assert.isNotNull(childMap.getChildAdapterClass());
- Assert.isNotNull(mofObject);
-
- EMF2DOMAdapter adapter = (EMF2DOMAdapter) EcoreUtil.getAdapter(mofObject.eAdapters(), EMF2DOMAdapter.ADAPTER_CLASS);
-
- if (adapter != null && adapter.isMOFProxy()) {
- mofObject.eAdapters().remove(adapter);
- removeAdapters(adapter.getNode());
- adapter = null;
- }
- if (adapter == null)
- adapter = primCreateAdapter(mofObject, childMap);
- return adapter;
- }
-
- /**
- * Create an adapter for a child DOM node
- *
- * @param node
- * org.w3c.dom.Node The node to create the adapter for.
- */
- protected EMF2DOMAdapter primCreateAdapter(EObject mofObject, Translator childMap) {
-
- Element newNode = createNewNode(mofObject, childMap);
- return new EMF2DOMAdapterImpl(mofObject, newNode, fRenderer, childMap);
- }
-
- /**
- * Create an adapter for a child DOM node
- *
- * @param node
- * org.w3c.dom.Node The node to create the adapter for.
- */
- protected EMF2DOMAdapter primCreateAdapter(Node node, Translator childMap) {
- return new EMF2DOMAdapterImpl(node, fRenderer, childMap);
- }
-
- /**
- * Create an adapter for a child DOM node
- *
- * @param node
- * org.w3c.dom.Node The node to create the adapter for.
- */
- protected EMF2DOMAdapter createAdapter(Node node, Translator childMap) {
-
- //Assert.isNotNull(childMap.getChildAdapterClass());
- Assert.isNotNull(node);
-
- EMF2DOMAdapter adapter = primGetExistingAdapter(node);
-
- if (adapter != null && adapter.isMOFProxy()) {
- removeDOMAdapter(node, adapter);
- adapter.getTarget().eAdapters().remove(adapter);
- adapter = null;
- }
-
- if (adapter == null) {
- adapter = primCreateAdapter(node, childMap);
- }
- return adapter;
- }
-
- protected Element createNewNode(EObject mofObject, Translator childMap) {
- Node node = getNode();
- Document doc = (node instanceof Document) ? (Document) node : node.getOwnerDocument();
-
- Element element = doc.createElement(childMap.getDOMName(mofObject));
- if (childMap.isEmptyTag())
- setEmptyTag(element);
-
- return element;
- }
-
- protected void setEmptyTag(Element element) {
- Revisit.toDo();
- //Need to figure out how to do this with pure DOM apis, if it is
- // possible
- }
-
- /*
- * Return true if MOF object is a proxy.
- */
- public boolean isMOFProxy() {
- if (isRoot || target == null)
- return false;
- return ((InternalEObject) target).eIsProxy();
- }
-
- public EObject getEObject() {
- if (isRoot)
- return null;
- return (EObject) target;
- }
-
- /**
- * Return the DOM node that the target of this adapter maps to. If the target MOF object maps to
- * more than one DOM node, this node is the top-most node.
- */
- public Node getNode() {
- return fNode;
- }
-
- public void setNode(Node aNode) {
- fNode = aNode;
- }
-
- public void updateDOM() {
- if (!isNotificationEnabled())
- return;
- primUpdateDOM();
- }
-
- public void updateMOF() {
- if (!isNotificationEnabled())
- return;
- primUpdateMOF();
- }
-
- protected void primUpdateDOM() {
- if (isRoot)
- updateDOMRootFeature();
- else {
- Translator[] maps = getChildTranslators();
- for (int i = 0; i < maps.length; i++) {
- updateDOMFeature(maps[i], getNode(), getEObject());
- }
- }
- }
-
- public void primUpdateMOF() {
- if (isRoot)
- updateMOFRootFeature();
- else {
- Translator[] maps = getChildTranslators();
- for (int i = 0; i < maps.length; i++) {
- updateMOFFeature(maps[i], getNode(), getEObject());
- }
- }
- }
-
- protected void updateDOMRootFeature() {
- boolean notificationFlag = isNotificationEnabled();
- try {
- setNotificationEnabled(false);
- primUpdateDOMMultiFeature(fTranslator, fNode, getResourceContents(), getDOMChildren(fNode, fTranslator), null);
- updateDOMDocumentType();
- } finally {
- setNotificationEnabled(notificationFlag);
- }
- }
-
- protected void updateMOFRootFeature() {
- boolean notificationFlag = isNotificationEnabled();
- try {
- setNotificationEnabled(false);
- updateMOFDocumentType();
- primUpdateMOFMultiFeature(fTranslator, fNode, getResourceContents(), getDOMChildren(fNode, fTranslator));
- } finally {
- setNotificationEnabled(notificationFlag);
- }
- }
-
- protected DocumentType getDocumentType() {
- return ((Document) fNode).getDoctype();
- }
-
- protected TranslatorResource getResource() {
- return (TranslatorResource) getTarget();
- }
-
- protected EList getResourceContents() {
- if (!isRoot)
- throw new IllegalStateException();
- return ((Resource) getTarget()).getContents();
- }
-
- protected void updateDOMDocumentType() {
-
- DocumentType docType = getDocumentType();
- String publicId = null, systemId = null, oldPublicId, oldSystemId;
- oldPublicId = docType == null ? null : docType.getPublicId();
- oldSystemId = docType == null ? null : docType.getSystemId();
- TranslatorResource resource = getResource();
- if (resource != null) {
- publicId = resource.getPublicId();
- systemId = resource.getSystemId();
- }
- if (!(StringUtil.stringsEqual(publicId, oldPublicId) && StringUtil.stringsEqual(systemId, oldSystemId)))
- fRenderer.replaceDocumentType(resource.getDoctype(), publicId, systemId);
- }
-
- protected void updateDOMDocumentType(Notification msg) {
- if (msg.getFeature() == TranslatorResource.DOC_TYPE_FEATURE)
- updateDOMDocumentType();
- }
-
- protected void updateMOFDocumentType() {
-
- TranslatorResource resource = getResource();
- if (resource == null)
- return;
-
- String publicId = null, systemId = null;
- DocumentType docType = getDocumentType();
-
- if (docType != null) {
- publicId = docType.getPublicId();
- systemId = docType.getSystemId();
- }
- if (!(StringUtil.stringsEqual(publicId, resource.getPublicId()) && StringUtil.stringsEqual(systemId, resource.getSystemId())))
- resource.setDoctypeValues(publicId, systemId);
- }
-
- public void notifyChanged(Notification msg) {
-
- if (isRoot) {
- notifyChangedForRoot(msg);
- return;
- }
- if (isDependencyFeature(msg))
- handleDependencyFeature(msg);
-
- if (!isNotificationEnabled())
- return;
-
- debugMOFNotify(msg);
-
- switch (msg.getEventType()) {
- case Notification.ADD :
- case Notification.REMOVE :
- case Notification.ADD_MANY :
- case Notification.REMOVE_MANY :
- case Notification.SET :
- case Notification.UNSET :
- case Notification.MOVE :
- Translator translator = findTranslator(msg);
- if (translator == null)
- translator = addVariableTranslatorIfNecessary(msg);
- if (translator != null)
- updateDOMFeature(translator, getNode(), getEObject());
- break;
- }
- }
-
- protected void notifyChangedForRoot(Notification msg) {
- if (!isNotificationEnabled())
- return;
-
- debugMOFNotify(msg);
-
- switch (msg.getEventType()) {
- case Notification.ADD :
- case Notification.REMOVE :
- case Notification.ADD_MANY :
- case Notification.REMOVE_MANY :
- primUpdateDOM();
- break;
- case Notification.SET :
- updateDOMDocumentType(msg);
- break;
- case EtoolsCopySession.RESOURCE_COPIED :
- updateDOM();
- break;
- }
- }
-
- protected void addDependencyAdapter(EObject child) {
- Adapter existing = EcoreUtil.getExistingAdapter(child, DependencyAdapter.KEY);
- if (existing != null)
- return;
- DependencyAdapter forwarder = new DependencyAdapter();
- child.eAdapters().add(forwarder);
- forwarder.setTarget(child);
- }
-
- protected void addDOMAdapter() {
-
- primAddDOMAdapter(fNode, this);
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("Adding DOM adapter: " + this); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tto: " + fNode); //$NON-NLS-1$
- }
-
- // Go through the maps. All of the DOM nodes that are not listened
- // to by another DOM Node adapter, must be listened to by this adapter.
- NodeList childNodes = fNode.getChildNodes();
- for (int j = 0; j < childNodes.getLength(); j++) {
- Node childNode = childNodes.item(j);
- int nodeType = childNode.getNodeType();
- if (!DOMUtilities.isTextNode(childNode) && nodeType != Node.COMMENT_NODE) {
- Translator map = findTranslator(childNode.getNodeName(), false);
- if (map != null && map.isManagedByParent())
- addDOMAdapter(childNode);
- }
- }
- }
-
- protected Translator addVariableTranslatorIfNecessary(Notification msg) {
- VariableTranslatorFactory fact = fTranslator.getVariableTranslatorFactory();
- Translator trans = null;
- if (fact != null && fact.accepts(msg)) {
- trans = fact.create(msg);
- if (trans != null)
- childTranslators = (Translator[]) Translator.concat(childTranslators, trans);
- }
- return trans;
- }
-
- protected Text createTextNode(Document doc, Translator map, String text) {
- String nonnulltext = (text != null) ? text : ""; //$NON-NLS-1$
- return map.isCDATAContent() ? doc.createCDATASection(nonnulltext) : doc.createTextNode(nonnulltext);
- }
-
- protected String extractReadAheadName() {
- if (!fTranslator.hasReadAheadNames())
- return null;
- String readAheadName = null;
-
- ReadAheadHelper helper = fTranslator.getReadAheadHelper(fNode.getNodeName());
- if (helper == null)
- return null;
-
- Node child = null;
- String[] names = helper.getValues();
- if (helper.getChildDOMName() == null) {
- for (int i = 0; i < names.length; i++) {
- child = DOMUtilities.getNodeChild(fNode, names[i]);
- if (child != null) {
- readAheadName = names[i];
- break;
- }
- }
- } else {
- child = DOMUtilities.getNodeChild(fNode, helper.getChildDOMName());
- if (child != null)
- readAheadName = DOMUtilities.getChildText(child);
- }
- if (readAheadName == null)
- readAheadName = names[0];
- return readAheadName;
- }
-
- /**
- * Extracts the text from <node>and converts it to an object suitable for setting into <feature>
- */
- protected Object extractValue(Node node, Translator map, EObject emfObject) {
-
- // Extract the value from the text child
- Node textNode = DOMUtilities.getChildTextNode(node);
- String trimmedValue = null;
- if (textNode != null)
- trimmedValue = textNode.getNodeValue();
- try {
- return map.convertStringToValue(trimmedValue, emfObject);
- } catch (FeatureValueConversionException ex) {
- handleFeatureValueConversionException(ex);
- return null;
- }
- }
-
- /**
- * @param ex
- */
- protected void handleFeatureValueConversionException(FeatureValueConversionException ex) {
- throw ex;
-
- }
-
- /*
- * Finds the child node that <map> specifies. If there is more than one child that satisfies
- * <map> then the first one is returned.
- *
- * This method traverses past the domPath if one is specified in the <map>.
- */
- protected Node findDOMNode(Node parent, Translator map) {
- return findDOMNode(parent, map, false);
- }
-
- /*
- * Finds the child node that <map> specifies. If there is more than one child that satisfies
- * <map> then the first one is returned. The <addAdapters> boolean is used to determine if the
- * receiver is added as an adapter to every node found on the path.
- *
- * This method traverses past the domPath if one is specified in the <map>.
- */
- protected Node findDOMNode(Node parent, Translator map, boolean addAdapters) {
-
- // First, trace down the path
- Node curNode = findDOMPath(parent, map, addAdapters);
- if (map.isDOMTextValue() || map.isDOMAttribute() || curNode == null)
- return curNode;
-
- // Now look for the first DOM name we can find
- String[] domNames = map.getDOMNames();
- Node node = null;
- for (int i = 0; i < domNames.length; i++) {
- String nodeName = domNames[i];
- List nodes = DOMUtilities.getNodeChildren(curNode, nodeName);
- if (nodes != null && !nodes.isEmpty()) {
- if (nodes.size() > 1)
- handleInvalidMultiNodes(nodeName);
- node = (Node) nodes.get(0);
- if (node != null) {
- if (addAdapters && (map != null || map.isManagedByParent()))
- addDOMAdapter(curNode);
- break;
- }
- }
- }
- return node;
- }
-
- protected void handleInvalidMultiNodes(String nodeName) {
- throw new IllegalStateException(WFTUtilsResourceHandler.getString(WFTUtilsResourceHandler.EMF2DOMAdapterImpl_ERROR_0, new Object[]{nodeName})); //$NON-NLS-1$
- }
-
- /**
- * Creates the path specified by <map>under <node>. Only the portion of the path that does not
- * exist (if any) is created
- *
- * @param node
- * org.w3c.dom.Node
- * @param map
- * com.ibm.etools.mof2dom.Translator
- */
- protected Text findOrCreateTextNode(Node parent, Translator map, String text) {
- Text textNode = DOMUtilities.getChildTextNode(parent);
- if (textNode != null) {
- textNode.setData(text);
- } else {
- if (!isEmptyTag((Element) parent)) {
- Text newNode = createTextNode(parent.getOwnerDocument(), map, text);
- DOMUtilities.insertBeforeNode(parent, newNode, null);
- return newNode;
- }
- }
- return textNode;
- }
-
- protected Translator findTranslator(String tagName, boolean attributeMap) {
- Translator[] maps = getChildTranslators();
- for (int i = 0; i < maps.length; i++) {
- Translator map = maps[i];
- if (map.isMapFor(tagName) && attributeMap == map.isDOMAttribute())
- return maps[i];
- }
-
- return null;
- }
-
- protected EMF2DOMAdapter getExistingAdapter(Node aNode) {
- EMF2DOMAdapter adapter = primGetExistingAdapter(aNode);
- if (adapter != null && adapter.isMOFProxy()) {
- removeDOMAdapter(aNode, adapter);
- adapter.getTarget().eAdapters().remove(adapter);
- adapter = null;
- }
- return adapter;
- }
-
- protected void handleDependencyFeature(Notification msg) {
- if (msg.getOldValue() != null)
- removeDependencyAdapter((EObject) msg.getOldValue());
- if (msg.getNewValue() != null)
- addDependencyAdapter((EObject) msg.getNewValue());
- }
-
- protected boolean isDependencyFeature(Notification msg) {
- switch (msg.getEventType()) {
- case Notification.SET :
- return fTranslator.isDependencyParent() && fTranslator.getDependencyFeature() == msg.getFeature();
- default :
- return false;
- }
- }
-
- protected boolean isEmptyTag(Element parent) {
- Revisit.toDo();
- //Determine how to implement this with pure DOM apis, if possible.
- return false;
- }
-
- protected void postUpdateDOMFeature(Translator map, Node node, EObject mofObject) {
- }
-
- protected void preUpdateDOMFeature(Translator map, Node node, EObject mofObject) {
- }
-
- /**
- * Update an attribute of the target DOM object from with the values currently stored in the MOF
- * object. The
- *
- * @map specifies the name of the MOF attribute to update and the name of the DOM node.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator
- */
- protected void primUpdateDOMFeature(Translator map, Node node, EObject mofObject) {
- Object attrValue = null;
- boolean isSet = false;
- if (map.isIDMap()) {
- try {
- attrValue = map.getMOFValue(mofObject);
- } catch (IDTranslator.NoResourceException ex) {
- //If the object has been removed from the resource,
- //No need to update
- return;
- }
- isSet = attrValue != null;
- } else {
- attrValue = map.getMOFValue(mofObject);
- isSet = map.isSetMOFValue(mofObject);
- }
-
- if (map.isDOMAttribute()) {
- // An attribute of the MOF object maps to an attribute of the
- // DOM node. Get the value of the MOF attribute and set it
- // into DOM node.
- Element e = (Element) createDOMPath(node, map);
- if (attrValue != null && isSet)
- e.setAttribute(map.getDOMName(mofObject), map.convertValueToString(attrValue, mofObject));
- else
- e.removeAttribute(map.getDOMName(mofObject));
- } else {
- updateDOMSubtree(map, node, mofObject, attrValue);
- }
- }
-
- /**
- * Update an attribute of the target DOM object from with the values currently stored in the MOF
- * object. The
- *
- * @map specifies the name of the MOF attribute to update and the name of the DOM node.
- */
- protected void primUpdateDOMLinkFeature(Translator map, Node node, EObject mofObject) {
- LinkUpdaterTarget.INSTANCE.updateDOM(map, node, mofObject);
-
- }
-
- /**
- * Update all the children of the target MOF object in the relationship described by
- *
- * @map.
- */
- protected void primUpdateDOMMultiFeature(Translator map, Node node, EObject mofObject) {
-
- List mofChildren = map.getMOFChildren(mofObject);
- List domChildren = getDOMChildren(node, map);
-
- primUpdateDOMMultiFeature(map, node, mofChildren, domChildren, mofObject);
- }
-
- /**
- * Update an attribute of the target MOF object from the DOM node subtree. The
- *
- * @map specifies the name of the MOF attribute to update and the name of the DOM node.
- */
- protected boolean primUpdateMOFFeature(Translator map, Node node, EObject mofObject) {
- if (!map.featureExists(mofObject))
- return false;
- Object domValue = null;
- boolean updateMOFAttAdapter = false;
- boolean isUnset = false;
- EMF2DOMAdapter attrAdapter = null;
-
- Node child = findDOMNode(node, map, true);
-
- if (map.isDOMAttribute() && child != null) {
- // An attribute of the MOF object maps to an attribute of the
- // DOM node. Get the value of the DOM attribute and set it
- // into the MOF object.
-
- Attr domAttr = (Attr) child.getAttributes().getNamedItem(map.getDOMName(mofObject));
- if (domAttr != null) {
- domValue = domAttr.getValue();
- domValue = map.convertStringToValue((String) domValue, mofObject);
- } else
- isUnset = true;
- } else {
- // An attribute of the MOF object is actually a sub-element
- // of the DOM node. Search for the first sub-element with
- // the correct name to use as an attribute.
- if (child != null) {
- // Check to see if this is a single valued attribute that has
- // a MOF object as its value
- if (!map.isManagedByParent()) {
- attrAdapter = createAdapter(child, map);
- updateMOFAttAdapter = true;
- domValue = attrAdapter.getTarget();
- } else {
- // Check to make sure the child is adapted. If not, adapt
- // it.
- addDOMAdapter(child);
-
- // Extract the value from the text child
- domValue = extractValue(child, map, mofObject);
- }
- } else
- isUnset = true;
- }
-
- // Set the attribute extracted from the DOM to the MOF object.
- boolean hasChanged = true;
- try {
- if (map.isIDMap())
- map.setMOFValue(mofObject, domValue);
- else {
- Object oldValue = null;
- oldValue = map.getMOFValue(mofObject);
- boolean isSet = map.isSetMOFValue(mofObject);
- //In the case of enums with default values, we need to trip
- // the attribute from
- //default to a set value
- if (oldValue == domValue) {
- if (oldValue == null || isSet)
- hasChanged = false;
- } else if (domValue == null && !isSet)
- //If the domValue is null and the feature is not set, then
- // we don't need
- //to do anything
- hasChanged = false;
- else if (oldValue != null && oldValue.equals(domValue) && isSet)
- hasChanged = false;
- if (oldValue == null && domValue == null && map.isSetMOFValue(mofObject) == isUnset)
- hasChanged = true;
- if (hasChanged) {
- if (!(map.isDataType()) && !map.isShared())
- removeMOFValue((EObject) oldValue, map);
- if (domValue == null)
- map.unSetMOFValue(mofObject);
- else
- map.setMOFValue(mofObject, domValue);
-
- if ((domValue == null && !(map.isEnumFeature())) || isUnset)
- map.unSetMOFValue(mofObject); //unset
- // null
- // for
- // non
- // enum
- // features
-
- if (updateMOFAttAdapter)
- attrAdapter.updateMOF();
- }
- }
- } catch (FeatureValueConversionException ex) {
- handleFeatureValueConversionException(ex);
- map.unSetMOFValue(mofObject);
- }
- return hasChanged;
- }
-
- /**
- * Update an attribute of the target MOF object from the DOM node subtree. This method is only
- * called if the DOM node changes and the map is an object link map. The
- *
- * @map specifies the name of the MOF attribute to update and the name of the DOM node.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator
- * @return Return true if the MOF feature was updated, false if no update was done.
- */
- protected void primUpdateMOFLinkFeature(Translator map, Node node, EObject mofObject) {
- LinkUpdaterTarget.INSTANCE.updateMOF(map, node, mofObject);
- }
-
- /**
- * Update all the children of the target MOF object in the relationship described by
- *
- * @map.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator Describes the mapping from the MOF
- * attribute name to the DOM node name
- */
- protected void primUpdateMOFMultiFeature(Translator map, Node node, EObject mofObject) {
- // If the feature is a collection of strings or ints, call a special
- // method
- // that handles this.
- if (map.isManagedByParent()) {
- updateMOFMultiPrimitiveFeature(map, node, mofObject);
- return;
- }
-
- List nodeChildren = getDOMChildren(node, map);
- List mofChildren = map.getMOFChildren(mofObject);
-
- primUpdateMOFMultiFeature(map, node, mofChildren, nodeChildren);
- }
-
- protected void removeDependencyAdapter(EObject obj) {
- Adapter existing = EcoreUtil.getExistingAdapter(obj, DependencyAdapter.KEY);
- if (existing != null)
- obj.eAdapters().remove(existing);
- }
-
- /**
- * Removes all the DOM children from <parent>that are represented by <map>.
- */
- protected void removeDOMChildren(Node parent, Translator map) {
- String[] domNames = map.getDOMNames();
- HashSet domNamesSet = new HashSet(domNames.length);
- for (int i = 0; i < domNames.length; i++)
- domNamesSet.add(domNames[i]);
-
- // Walk through all the children and find any that match the map.
- NodeList nl = parent.getChildNodes();
- List toRemove = new ArrayList();
- for (int i = 0; i < nl.getLength(); i++) {
- Node childNode = nl.item(i);
- if (domNamesSet.contains(childNode.getNodeName()))
- toRemove.add(childNode);
- }
-
- // Remove any children that were found.
- for (int i = 0; i < toRemove.size(); i++) {
- Node childNode = (Node) toRemove.get(i);
- removeDOMChild(parent, childNode, true);
- }
- }
-
- protected void setTargetFromNode() {
- setTarget(fTranslator.createEMFObject(fNode.getNodeName(), extractReadAheadName()));
- }
-
- /**
- * Update an attribute of the target DOM object from with the values currently stored in the MOF
- * object. The
- *
- * @map specifies the name of the MOF attribute to update and the name of the DOM node.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator
- */
- final public void updateDOMFeature(Translator map, Node node, EObject mofObject) {
- if (!isNotificationEnabled())
- return;
- try {
- preUpdateDOMFeature(map, node, mofObject);
- if (map.isMultiValued()) {
- updateDOMMultiFeature(map, node, mofObject);
- return;
- }
-
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("Updating DOM Node: " + node); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tfrom: " + mofObject); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tmap : " + map); //$NON-NLS-1$
- }
- boolean notificationFlag = isNotificationEnabled();
- try {
- setNotificationEnabled(false);
- primUpdateDOMFeature(map, node, mofObject);
- } finally {
- setNotificationEnabled(notificationFlag);
- }
-
- if (map.isTargetLinkMap()) {
- updateDOMLinkFeature(map, node, mofObject);
- }
- } finally {
- postUpdateDOMFeature(map, node, mofObject);
- }
- }
-
- /**
- * Update an attribute of the target DOM object from the values currently stored in the MOF
- * object. The
- *
- * @map specifies the name of the MOF attribute to update and the name of the DOM node.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator
- */
- final protected void updateDOMLinkFeature(Translator map, Node node, EObject mofObject) {
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("Updating DOM Node (link): " + node); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tfrom: " + mofObject); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tmap : " + map); //$NON-NLS-1$
- }
- primUpdateDOMLinkFeature(map, node, mofObject);
- }
-
- /**
- * Update all the children of the target MOF object in the relationship described by
- *
- * @map.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator Describes the mapping from the MOF
- * attribute name to the DOM node name
- */
- final protected void updateDOMMultiFeature(Translator map, Node node, EObject mofObject) {
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("Updating DOM Node (multi): " + node); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tfrom: " + mofObject); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tmap : " + map); //$NON-NLS-1$
- }
- boolean notificationFlag = isNotificationEnabled();
- try {
- setNotificationEnabled(false);
- primUpdateDOMMultiFeature(map, node, mofObject);
- } finally {
- setNotificationEnabled(notificationFlag);
- }
- }
-
- /**
- * Update a DOM subtree to reflect the mofObject and map passed in. The subtree is of <node>is
- * updated.
- */
- protected void updateDOMSubtree(Translator map, Node node, EObject mofObject, Object attrValue) {
-
- if (map.featureExists(mofObject)) {
- if ((map.isEnumFeature() || map.isBooleanFeature()) && (map.isUnsettable() && !map.isSetMOFValue(mofObject)))
- attrValue = null;
- } else
- attrValue = map.extractStringValue(mofObject);
-
- // Create and/or update the DOM subtree
- if (attrValue != null) {
- Node parent = createDOMPath(node, map);
- if (map.isManagedByParent()) {
- // Handle the case where the mof value is not another
- // mof object (primitive)
- if (map.getDOMName(mofObject) != null && map.getDOMName(mofObject).startsWith("#")) //$NON-NLS-1$
- return;
-
- Element child = map.isDOMTextValue() ? (Element) parent : findOrCreateNode(parent, map, map.getDOMName(mofObject));
-
- findOrCreateTextNode(child, map, map.convertValueToString(attrValue, mofObject));
- } else {
- // Handle the case were the mof value is a mof object.
- EObject mofValue = (EObject) attrValue;
- EMF2DOMAdapter valueAdapter = (EMF2DOMAdapter) EcoreUtil.getExistingAdapter(mofValue, EMF2DOMAdapter.ADAPTER_CLASS);
- if (valueAdapter != null)
- valueAdapter.updateDOM();
- else {
- removeDOMChildren(parent, map);
- EMF2DOMAdapter adapter = createAdapter(mofValue, map);
- List mofChildren = map.getMOFChildren(mofObject);
- List domChildren = getDOMChildren(parent, map);
-
- Node insertBeforeNode = findInsertBeforeNode(parent, map, mofChildren, 0, domChildren);
- DOMUtilities.insertBeforeNodeAndWhitespace(parent, adapter.getNode(), insertBeforeNode);
- boolean notificationFlag = adapter.isNotificationEnabled();
- adapter.setNotificationEnabled(false);
- try {
- indent(adapter.getNode(), map);
- } finally {
- adapter.setNotificationEnabled(notificationFlag);
- }
- adapter.updateDOM();
- }
- }
- } else {
- // The attribute value was set to null or unset. Remove any
- // existing DOM nodes.
- Node child = findDOMNode(node, map);
- if (child != null)
- removeDOMChild(child.getParentNode(), child);
- }
- }
-
- /**
- * Update a feature that is set by linking to another existing object. This method is called
- * when the MOF object is updated in order to update DOM nodes.
- */
- final protected void updateMOFLinkFeature(Translator map, Node node, EObject mofObject) {
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("Updating MOFObject (link): " + mofObject); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tfrom: " + node); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tmap : " + map); //$NON-NLS-1$
- }
- boolean notificationFlag = isNotificationEnabled();
- try {
- setNotificationEnabled(false);
- primUpdateMOFLinkFeature(map, node, mofObject);
- } finally {
- setNotificationEnabled(notificationFlag);
- }
- }
-
- /**
- * Update all the children of the target MOF object in the relationship described by
- *
- * @map.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator Describes the mapping from the MOF
- * attribute name to the DOM node name
- */
- final protected void updateMOFMultiFeature(Translator map, Node node, EObject mofObject) {
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("Updating MOFObject (multi): " + mofObject); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tfrom: " + node); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tmap : " + map); //$NON-NLS-1$
- }
- boolean notificationFlag = isNotificationEnabled();
- try {
- setNotificationEnabled(false);
- primUpdateMOFMultiFeature(map, node, mofObject);
- } finally {
- setNotificationEnabled(notificationFlag);
- }
- }
-
- /**
- * Update all the children of the target MOF object in the relationship described by
- *
- * @map. The relationship MUST BE a collection of string for this method to work.
- */
- protected void updateMOFMultiPrimitiveFeature(Translator map, Node node, EObject mofObject) {
- List nodeChildren = getDOMChildren(node, map);
-
- map.clearList(mofObject);
-
- // Go through the list of nodes and update the MOF collection
- for (int i = 0; i < nodeChildren.size(); i++) {
- Node child = (Node) nodeChildren.get(i);
- Object attributeValue = extractValue(child, map, mofObject);
- if (attributeValue != null)
- map.setMOFValue(mofObject, attributeValue, i);
-
- // Adapt the node so update will occur.
- addDOMAdapter(child);
- }
- if (map.hasDOMPath() && nodeChildren.isEmpty() && findDOMPath(node, map, false) != null)
- map.setMOFValueFromEmptyDOMPath(mofObject);
- }
-
- /**
- * Update an attribute of the target MOF object from the DOM node subtree. The
- *
- * @map specifies the name of the MOF attribute to update and the name of the DOM node.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator
- */
- public void updateMOFFeature(Translator map, Node node, EObject mofObject) {
- if (!isNotificationEnabled())
- return;
- if (map.isMultiValued()) {
- updateMOFMultiFeature(map, node, mofObject);
- return;
- } else if (map.isComment()) {
- updateMOFCommentFeature(map, node, mofObject);
- return;
- }
-
- // TODO MDE Add a map.isComment() and updateMOFCommentFeature(map, node, mofObject);
-
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("Updating MOFObject: " + mofObject); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tfrom: " + node); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tmap : " + map); //$NON-NLS-1$
- }
- boolean notificationFlag = isNotificationEnabled();
- boolean hasChanged = false;
- try {
- setNotificationEnabled(false);
- hasChanged = primUpdateMOFFeature(map, node, mofObject);
- } finally {
- setNotificationEnabled(notificationFlag);
- }
-
- if (map.isTargetLinkMap() && hasChanged)
- updateMOFLinkFeature(map, node, mofObject);
- }
-
- /**
- * @param map
- * @param node
- * @param mofObject
- */
- public void updateMOFCommentFeature(Translator map, Node node, EObject mofObject) {
- Node commentNode = node;
- /* scan up the dom to find the first comment node before this node */
- while ((commentNode = commentNode.getPreviousSibling()) != null && commentNode.getNodeType() != Node.COMMENT_NODE) {
- /* no comment available */
- if (commentNode.getNodeType() == Node.ELEMENT_NODE)
- return;
- }
- if (commentNode != null)
- map.setMOFValue(mofObject, commentNode.getNodeValue());
-
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRenderer.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRenderer.java
deleted file mode 100644
index 206860d42..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRenderer.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.internal.emf.utilities.DOMLoadOptions;
-import org.eclipse.wst.common.internal.emf.utilities.DOMUtilities;
-import org.eclipse.wst.common.internal.emf.utilities.Revisit;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-
-
-public class EMF2DOMRenderer extends AbstractRendererImpl implements Renderer {
-
- protected Map domAdapterRegistry;
- protected boolean needsToCreateDOM = true;
- protected Document document;
-
- /**
- * Constructor for DOMRendererImpl.
- */
- public EMF2DOMRenderer() {
- super();
- if (managesDOMAdapters())
- initDOMAdapterRegistry();
- }
-
- /**
- * @see com.ibm.etools.emf2xml.Renderer#doLoad(InputStream, Map)
- */
- public void doLoad(InputStream in, Map options) throws IOException {
- if ((in != null) || !useStreamsForIO()) {
- loadDocument(in, options);
- EMF2DOMAdapter adapter = createRootDOMAdapter();
- adapter.updateMOF();
- }
- }
-
- protected void loadDocument(InputStream in, Map options) throws IOException {
- try {
- DOMLoadOptions domOpts = new DOMLoadOptions();
- domOpts.setAllowJavaEncodings(true);
- domOpts.setExpandEntityRefererences(true);
- domOpts.setValidate(isValidating());
- document = DOMUtilities.loadDocument(in, domOpts, getResource().getEntityResolver());
- needsToCreateDOM = false;
- } catch (RuntimeException t_rex) {
- throw t_rex;
- } catch (IOException iox) {
- throw iox;
- } catch (Exception ex) {
- throw new WrappedException(ex);
- }
- }
-
-
- /**
- * @see com.ibm.etools.emf2xml.Renderer#doSave(OutputStream, Map)
- */
- public void doSave(OutputStream outputStream, Map options) throws IOException {
- createDOMTreeIfNecessary();
- serializeDocument(outputStream);
- }
-
- /**
- * Subclasses should override if adapters are not cached within this renderer, e.g., they are
- * stored in notifying Nodes
- */
- protected boolean managesDOMAdapters() {
- return true;
- }
-
- protected void initDOMAdapterRegistry() {
- if (domAdapterRegistry == null)
- domAdapterRegistry = new HashMap();
- }
-
- public void registerDOMAdapter(Node node, EMF2DOMAdapter adapter) {
- domAdapterRegistry.put(node, adapter);
- }
-
- public EMF2DOMAdapter getExistingDOMAdapter(Node node) {
- return (EMF2DOMAdapter) domAdapterRegistry.get(node);
- }
-
- public void removeDOMAdapter(Node aNode, EMF2DOMAdapter anAdapter) {
- domAdapterRegistry.remove(aNode);
- }
-
- /**
- * @see com.ibm.etools.emf2xml.Renderer#prepareToAddContents()
- */
- public void prepareToAddContents() {
- // createDOMTreeIfNecessary();
- }
-
- protected Node createDOMTree() {
- createDocument();
- EMF2DOMAdapter adapter = createRootDOMAdapter();
- adapter.updateDOM();
- needsToCreateDOM = false;
- return document;
- }
-
-
- protected EMF2DOMAdapter createRootDOMAdapter() {
- EMF2DOMAdapter root = new EMF2DOMAdapterImpl(getResource(), document, this, getResource().getRootTranslator());
- registerDOMAdapter(document, root);
- return root;
- }
-
-
- protected void createDOMTreeIfNecessary() {
- if (needsToCreateDOM)
- createDOMTree();
- }
-
- /**
- * Create a new Document given
- *
- * @aResource.
- */
- protected void createDocument() {
- TranslatorResource res = getResource();
- res.setDefaults();
- try {
- document = DOMUtilities.createNewDocument(res.getDoctype(), res.getPublicId(), res.getSystemId());
- } catch (ParserConfigurationException e) {
- throw new WrappedException(e);
- } catch (SAXException e) {
- throw new WrappedException(e);
- } catch (IOException e) {
- throw new WrappedException(e);
- }
- }
-
- public void serializeDocument(OutputStream out) throws IOException {
- /*
- * OutputFormat format = createOutputFormat(); Serializer serializer =
- * SerializerFactory.getSerializerFactory(Method.XML).makeSerializer(out, format);
- * serializer.asDOMSerializer().serialize(document);
- */
- try {
- TransformerFactory factory = TransformerFactory.newInstance();
- /*
- * try { factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA); } catch
- * (IllegalArgumentException x) { }
- */
- Transformer transformer = factory.newTransformer();
-
- transformer.setOutputProperty(OutputKeys.ENCODING, getResource().getEncoding());
- transformer.setOutputProperty(OutputKeys.VERSION, getResource().getXMLVersion());
- transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
- transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); //$NON-NLS-1$
- if (getResource().getPublicId() != null)
- transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, getResource().getPublicId());
- if (getResource().getSystemId() != null)
- transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, getResource().getSystemId());
- transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
- transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); //$NON-NLS-1$ //$NON-NLS-2$
- DOMSource source = new DOMSource(document.getDocumentElement());
- /* source.setSystemId(getResource().getSystemId()); */
- transformer.transform(source, new StreamResult(out));
- } catch (TransformerConfigurationException e) {
- Logger.getLogger().logError(e);
- } catch (TransformerFactoryConfigurationError e) {
- Logger.getLogger().logError(e);
- } catch (TransformerException e) {
- Logger.getLogger().logError(e);
- } finally {
- }
- }
-
- /*
- * protected OutputFormat createOutputFormat() { OutputFormat format = new OutputFormat();
- * format.setIndenting(true); format.setLineSeparator(DOMUtilities.NEWLINE_STRING);
- * //$NON-NLS-1$ format.setEncoding(getResource().getEncoding());
- * format.setVersion(getResource().getXMLVersion()); return format; }
- */
-
- public void replaceDocumentType(String docTypeName, String publicId, String systemId) {
- Revisit.revisit();
- Document newDoc = null;
- // Need be able to update the doctype directly on the existing document; right now can't
- // because
- // of limitations on parser neutral apis
-
- try {
- newDoc = DOMUtilities.createNewDocument(docTypeName, publicId, systemId);
- } catch (ParserConfigurationException e) {
- throw new WrappedException(e);
- } catch (SAXException e) {
- throw new WrappedException(e);
- } catch (IOException e) {
- throw new WrappedException(e);
- }
-
-
- replaceNode(document.getDocumentElement(), newDoc, newDoc);
- readapt(document, newDoc);
- document = newDoc;
- }
-
- protected void replaceNode(Node oldChild, Node newParent, Document newDoc) {
- Node newChild = newDoc.importNode(oldChild, false);
- newParent.appendChild(newChild);
- readapt(oldChild, newChild);
- NodeList children = oldChild.getChildNodes();
- int length = children.getLength();
- for (int i = 0; i < length; i++) {
- replaceNode(children.item(i), newChild, newDoc);
- }
- }
-
- public void preUnload() {
- EMF2DOMAdapter adapter = (EMF2DOMAdapter) EcoreUtil.getAdapter(resource.eAdapters(), EMF2DOMAdapter.ADAPTER_CLASS);
- if (adapter != null) {
- adapter.removeAdapters(adapter.getNode());
- }
- }
-
- protected void readapt(Node oldChild, Node newChild) {
- EMF2DOMAdapter adapter = getExistingDOMAdapter(oldChild);
- if (adapter != null) {
- registerDOMAdapter(newChild, adapter);
- // Some nodes are managed by the parent and thus the
- // node should not be set on the parent adapter
- if (adapter.getNode() == oldChild)
- adapter.setNode(newChild);
- }
- }
-
- public int getVersionID() {
- return getResource().getVersionID();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRendererFactory.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRendererFactory.java
deleted file mode 100644
index fce560371..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRendererFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-public class EMF2DOMRendererFactory extends RendererFactory {
-
- public static final EMF2DOMRendererFactory INSTANCE = new EMF2DOMRendererFactory();
-
- public EMF2DOMRendererFactory() {
- super();
- }
-
- /**
- * @see com.ibm.etools.emf2xml.RendererFactory#createRenderer()
- */
- public Renderer createRenderer() {
- EMF2DOMRenderer renderer = new EMF2DOMRenderer();
- renderer.setValidating(isValidating());
- return renderer;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRendererFactoryDefaultHandler.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRendererFactoryDefaultHandler.java
deleted file mode 100644
index 1257a061a..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRendererFactoryDefaultHandler.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Dec 1, 2003
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-/**
- * @author schacher
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class EMF2DOMRendererFactoryDefaultHandler implements RendererFactoryDefaultHandler {
-
- public static final EMF2DOMRendererFactoryDefaultHandler INSTANCE = new EMF2DOMRendererFactoryDefaultHandler();
-
- /**
- *
- */
- protected EMF2DOMRendererFactoryDefaultHandler() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.RendererFactoryDefaultHandler#getDefaultRendererFactory()
- */
- public RendererFactory getDefaultRendererFactory() {
- return EMF2DOMRendererFactory.INSTANCE;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXDocumentHandler.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXDocumentHandler.java
deleted file mode 100644
index 1ec3dbe9e..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXDocumentHandler.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-import java.io.IOException;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.xml.sax.Attributes;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * The EMF2SAXDocumentHandler is utilized by the SAX parser to announce XML Events, such as
- * beginning and end of XML elements and the contents of those elements.
- *
- * @author mdelder
- */
-public class EMF2SAXDocumentHandler extends DefaultHandler {
-
- private TranslatorResource resource = null;
- private final CacheEventStack eventStack = new CacheEventStack();
- private CacheEventPool availableEventPool = new CacheEventPool();
-
- /**
- * Create an EMF2SAXDocumentHandler to populate the given resource.
- *
- */
- public EMF2SAXDocumentHandler(TranslatorResource resource) {
- this.resource = resource;
- }
-
- /**
- * @see org.xml.sax.helpers.DefaultHandler#resolveEntity(java.lang.String, java.lang.String)
- */
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
- InputSource result = null;
- this.resource.setDoctypeValues(publicId, systemId);
-
- try {
- EntityResolver entityResolver = this.resource.getEntityResolver();
-
- if (entityResolver != null)
- result = entityResolver.resolveEntity(publicId, systemId);
- else
- result = super.resolveEntity(publicId, systemId);
- } catch (IOException ioe) {
- throw new SAXException(ioe);
- }
-
- return result;
- }
-
- /**
- * @see org.xml.sax.ContentHandler#startDocument()
- */
- public void startDocument() throws SAXException {
- /*
- * The endDocument() method should have frozen the pool, or it may not be warmed yet. In
- * either case, this method call will do as little work as necessary
- */
- availableEventPool.warmPool();
-
- /* This line should not be necessary, but is left for safty */
- eventStack.clear();
- this.createRoot(this.resource);
-
- }
-
- /**
- * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String,
- * java.lang.String, org.xml.sax.Attributes)
- */
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- addToStack(qName, attributes);
- }
-
- /**
- * @see org.xml.sax.ContentHandler#characters(char[], int, int)
- */
- public void characters(char[] data, int start, int length) throws SAXException {
-
- CacheEventNode currentRecord = getCurrentRecord();
- if (currentRecord != null) {
- currentRecord.appendToBuffer(data, start, length);
- }
- }
-
- /**
- * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String,
- * java.lang.String)
- */
- public void endElement(String uri, String localName, String qName) throws SAXException {
-
- CacheEventNode currentRecord = null;
-
- /*
- * This should only happen in the case where the DOMPath was ignored so the stack does not
- * quite match with the XML data structure. In this case we do nothing
- */
- if (qName.equals(this.getCurrentRecord().getNodeName())) {
- currentRecord = this.removeCurrentRecord();
- if (currentRecord != null) {
- currentRecord.commit();
- }
- }
- }
-
- /**
- * @see org.xml.sax.ContentHandler#endDocument()
- */
- public void endDocument() throws SAXException {
- CacheEventNode lastRecord = this.removeCurrentRecord();
- lastRecord.commit();
- availableEventPool.freezePool();
- }
-
- /**
- * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
- */
- public void error(SAXParseException ex) throws SAXException {
- throw ex;
- }
-
- /**
- * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
- */
- public void fatalError(SAXParseException ex) throws SAXException {
- throw ex;
- }
-
- /**
- * @see org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException)
- */
- public void warning(SAXParseException ex) throws SAXException {
- Logger.getLogger().logWarning(ex);
- }
-
- /**
- * @return
- */
- public TranslatorResource getResource() {
- return resource;
- }
-
- protected void createRoot(TranslatorResource resourceArg) {
- this.eventStack.push(availableEventPool.createCacheEventNode(resourceArg));
- }
-
- protected void addToStack(String nodeName, Attributes attributes) {
- CacheEventNode parent = this.getCurrentRecord();
- if (!parent.isChildIgnorable(nodeName)) {
- this.eventStack.push(availableEventPool.createCacheEventNode(parent, nodeName, attributes));
- }
- }
-
- /**
- * Return the current CENO without removing it from the event stack.
- *
- * @return the current CENO without removing it
- */
- protected CacheEventNode getCurrentRecord() {
- CacheEventNode result = null;
- if (!this.eventStack.isEmpty()) {
- result = this.eventStack.peek();
- }
- return result;
- }
-
- /**
- * Return the current CENO and remove it from the event stack.
- *
- * @return the current CENO and remove it
- */
- protected CacheEventNode removeCurrentRecord() {
- CacheEventNode result = null;
- if (!this.eventStack.isEmpty()) {
- result = this.eventStack.pop();
- }
- return result;
- }
-
- // private final void printStack() {
- // // System.out.println("Printing stack ...");
- // // for (int i = 0; i < this.eventStack.size(); i++) {
- // // debug("stack[" + i + "]: " + eventStack.get(i));
- // // }
- // // System.out.println("... Printed stack");
- // }
- //
- // private final static void debug(Object obj) {
- // // System.out.println(obj);
- // }
- //
- // private final static void warn(Object obj) {
- // //System.err.println(obj);
- // }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXRenderer.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXRenderer.java
deleted file mode 100644
index 7bd2634e3..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXRenderer.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Map;
-
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.sax.SAXTransformerFactory;
-import javax.xml.transform.sax.TransformerHandler;
-import javax.xml.transform.stream.StreamResult;
-
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.XMLReader;
-
-/**
- * @author mdelder
- */
-public class EMF2SAXRenderer extends AbstractRendererImpl {
-
- /**
- *
- */
- public EMF2SAXRenderer() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#doLoad(java.io.InputStream, java.util.Map)
- */
- public void doLoad(InputStream in, Map options) {
- try {
- SAXParserFactory factory = SAXParserFactory.newInstance();
- factory.setValidating(isValidating());
- factory.setNamespaceAware(true);
- /*
- * Causes errors in IBM JDK try { factory.setAttribute(JAXP_SCHEMA_LANGUAGE,
- * W3C_XML_SCHEMA); } catch (IllegalArgumentException x) { }
- */
- SAXParser parser = factory.newSAXParser();
- XMLReader reader = parser.getXMLReader();
- EMF2SAXDocumentHandler handler = new EMF2SAXDocumentHandler(this.getResource());
- try {
- reader.setFeature("http://xml.org/sax/features/validation", isValidating()); //$NON-NLS-1$
- } catch (SAXNotRecognizedException snre) {
- }
- try {
- reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true); //$NON-NLS-1$
- } catch (SAXNotRecognizedException snre) {
- }
- try {
- reader.setFeature("http://apache.org/xml/features/validation/schema", isValidating()); //$NON-NLS-1$
- } catch (SAXNotRecognizedException e) {
- reader.setFeature("http://xml.org/sax/features/validation", false); //$NON-NLS-1$
- Logger.getLogger().log("Warning: Parser does not support \"http://apache.org/xml/features/validation/schema\". Validation will be disabled."); //$NON-NLS-1$
- }
- try {
- reader.setFeature("http://apache.org/xml/features/allow-java-encodings", true); //$NON-NLS-1$
- } catch (SAXNotRecognizedException e) {
- Logger.getLogger().log("Warning: Parser does not support \"http://apache.org/xml/features/allow-java-encodings\"."); //$NON-NLS-1$
- }
- /*
- * try { reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler); }
- * catch (SAXNotRecognizedException e) { }
- */
- reader.setContentHandler(handler);
- reader.setErrorHandler(handler);
- //reader.setDTDHandler(handler);
- reader.setEntityResolver(handler);
- InputSource testsource = new InputSource(in);
- reader.parse(testsource);
- } catch (RuntimeException t_rex) {
- throw t_rex;
- } catch (Exception ex) {
- throw new WrappedException(ex);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#doSave(java.io.OutputStream, java.util.Map)
- */
- public void doSave(OutputStream outputStream, Map options) throws IOException {
-
- /*
- * try { Serializer serializer =
- * SerializerFactory.getSerializerFactory(Method.XML).makeSerializer(outputStream,
- * createOutputFormat()); serializer.setOutputByteStream(outputStream); ContentHandler
- * handler = serializer.asContentHandler();
- */
-
- TransformerHandler handler = null;
- try {
- try {
- SAXTransformerFactory factory = (SAXTransformerFactory) TransformerFactory.newInstance();
- handler = factory.newTransformerHandler();
-
- handler.setResult(new StreamResult(outputStream));
- Transformer transformer = handler.getTransformer();
- transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
- transformer.setOutputProperty(OutputKeys.ENCODING, getResource().getEncoding());
- transformer.setOutputProperty(OutputKeys.VERSION, getResource().getXMLVersion());
- transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
- transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); //$NON-NLS-1$
- transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); //$NON-NLS-1$ //$NON-NLS-2$
-
- if (getResource().getPublicId() != null)
- transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, getResource().getPublicId());
- if (getResource().getSystemId() != null)
- transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, getResource().getSystemId());
-
- } catch (TransformerConfigurationException e) {
- Logger.getLogger().logError(e);
- } catch (TransformerFactoryConfigurationError e) {
- Logger.getLogger().logError(e);
- }
- if (handler == null) {
- Logger.getLogger("SAX Writer is null"); //$NON-NLS-1$
- return;
- }
- EMF2SAXWriter writer = new EMF2SAXWriter();
- writer.serialize(this.resource, handler);
- } catch (SAXException saxe) {
- throw new WrappedException(saxe);
- }
- }
-
- /*
- * protected OutputFormat createOutputFormat() { OutputFormat format = new OutputFormat();
- * format.setIndenting(true); format.setLineSeparator(DOMUtilities.NEWLINE_STRING);
- * //$NON-NLS-1$ format.setEncoding(getResource().getEncoding());
- * format.setVersion(getResource().getXMLVersion()); if (this.resource != null)
- * format.setDoctype(this.resource.getPublicId(), this.resource.getSystemId()); return format; }
- */
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#prepareToAddContents()
- */
- public void prepareToAddContents() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#getVersionID()
- */
- public int getVersionID() {
- return getResource().getVersionID();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXRendererFactory.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXRendererFactory.java
deleted file mode 100644
index d3fd5d91b..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXRendererFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Aug 19, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-/**
- * Used to create instances of the EMF2SAXRenderer
- *
- * @author mdelder
- */
-public class EMF2SAXRendererFactory extends RendererFactory {
-
- public static final EMF2SAXRendererFactory INSTANCE = new EMF2SAXRendererFactory();
-
- protected EMF2SAXRendererFactory() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.RendererFactory#createRenderer()
- */
- public Renderer createRenderer() {
- EMF2SAXRenderer renderer = new EMF2SAXRenderer();
- renderer.setValidating(isValidating());
- return renderer;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXWriter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXWriter.java
deleted file mode 100644
index c5d08070e..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXWriter.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-import java.util.List;
-import java.util.Stack;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * The EMF2SAXWriter handles the serialization of EMF Resources using SAX events. SAX events are
- * triggered to the content handler as the tree is being parsed. These events can then be written
- * into any stream wrapped by the ContentHandler.
- *
- * @author mdelder
- */
-public class EMF2SAXWriter {
-
- public static final String NAMESPACE = "";//"http://java.sun.com/xml/ns/j2ee"; //$NON-NLS-1$
-
- /* Used in those cases where no Attributes are necessary */
- private static final Attributes EMPTY_ATTRIBUTES = new AttributesImpl();
-
- /**
- * Serialize an EMF resource into an XML Stream using the given ContentHandler. Note that this
- * method can also be used to copy a given EMF Resource if the EMF2SAXDocumentHandler is used as
- * the given ContentHandler.
- *
- * @param resource
- * @param handler
- */
- public void serialize(TranslatorResource resource, ContentHandler handler) throws SAXException {
-
- Translator rootTranslator = resource.getRootTranslator();
- EList contents = resource.getContents();
-
- if (contents.size() != 1) {
- throw new IllegalStateException("The contents of a resource may only contain one EMF Model Object."); //$NON-NLS-1$
- }
- handler.startDocument();
- EObject element = (EObject) contents.get(0);
- serialize(handler, element, rootTranslator, new WriterHints(resource));
- handler.endDocument();
-
- }
-
- private void serialize(ContentHandler handler, EObject target, Translator translator, WriterHints hints) throws SAXException {
-
- List mofChildren = null;
- Object rawValue = null;
- EObject newTarget = null;
- Translator currentChildTranslator = null;
- Translator nextTranslator = null;
- char[] characterData = null;
- String convertedValue = null;
- Attributes attributes = null;
- String childDomName = null;
- final int version = hints.getVersion();
-
- /*
- * Processing hints are used to remember where are in the iteration of the translator's
- * children. see the TranslatorFilter for more information on how this array is used.
- */
- int[] processingHints = TranslatorFilter.createProcessingHints();
-
- String targetDomName = translator.getDOMName(target);
-
- attributes = getAttributes(translator, target, hints);
-
- handler.startElement(NAMESPACE, targetDomName, targetDomName, attributes);
-
- currentChildTranslator = TranslatorFilter.getNextObjectTranslator(translator, processingHints[TranslatorFilter.NEXT_START_HINT_INDX], processingHints, target, version);
- while (currentChildTranslator != null) {
- /* For each Child Translator of the Translator parameter passed into the method */
-
- /* Does the Translator have any MOF Children? */
- mofChildren = currentChildTranslator.getMOFChildren(target);
- openDomPathIfNecessary(handler, hints, currentChildTranslator, target, mofChildren);
-
- if (currentChildTranslator.isManagedByParent()) {
- /*
- * Translators which are managed by their parents require less processing -- just
- * convert their value to a string and write it out as the content of an XML element
- */
- childDomName = currentChildTranslator.getDOMName(target);
- if (!currentChildTranslator.isEmptyTag()) {
- /* The Translator is not an Empty tag. Its text content is significant */
-
- if (mofChildren.size() > 0) {
- for (int j = 0; j < mofChildren.size(); j++) {
-
- /* Text only translators will not have open and close XML elements */
- if (!currentChildTranslator.isDOMTextValue())
- handler.startElement(NAMESPACE, childDomName, childDomName, EMPTY_ATTRIBUTES);
-
- rawValue = mofChildren.get(j);
- /* convertValueToString should always return a non-null String */
- convertedValue = currentChildTranslator.convertValueToString(rawValue, target);
- characterData = XMLEncoderDecoder.escape(convertedValue).toCharArray();
- handler.characters(characterData, 0, characterData.length);
-
- if (!currentChildTranslator.isDOMTextValue())
- handler.endElement(NAMESPACE, childDomName, childDomName);
- }
- }
- } else {
- /*
- * The Translator is an Empty Element (its mere presence has significance) (e.g.
- * <cascade-delete/>
- */
-
- if (currentChildTranslator.isBooleanFeature()) {
- /* Boolean features may or may not be rendered */
- rawValue = mofChildren.get(0);
- if (rawValue != null && ((Boolean) rawValue).booleanValue()) {
- handler.startElement(NAMESPACE, childDomName, childDomName, EMPTY_ATTRIBUTES);
- handler.endElement(NAMESPACE, childDomName, childDomName);
- }
-
- } else {
- /* Always render any other Empty elements */
- handler.startElement(NAMESPACE, childDomName, childDomName, EMPTY_ATTRIBUTES);
- handler.endElement(NAMESPACE, childDomName, childDomName);
- }
- }
- } else {
-
- /* The Translator is a more complex feature, handle its processing recursively */
- for (int j = 0; j < mofChildren.size(); j++) {
- newTarget = (EObject) mofChildren.get(j);
- serialize(handler, newTarget, currentChildTranslator, hints);
- }
- }
-
- /* Fetch the next peer translator */
- nextTranslator = TranslatorFilter.getNextObjectTranslator(translator, processingHints[TranslatorFilter.NEXT_START_HINT_INDX], processingHints, target, version);
-
- closeDomPathIfNecessary(handler, hints, currentChildTranslator, nextTranslator, target, mofChildren);
-
- /*
- * We needed to invoke closeDomPathIfNecessary() with the peer, now we move on to
- * process that peer
- */
- currentChildTranslator = nextTranslator;
-
- }
- handler.endElement(NAMESPACE, targetDomName, targetDomName);
- }
-
- /**
- * Determines whether or not a DOM Path should be rendered. This method is particularly useful
- * for determining whether Empty XML elements are relevant and should be written to the XML
- * stream.
- *
- * @param target
- * The EMF Target of the Translation
- * @param currentChildTranslator
- * The current Translator
- * @param mofChildren
- * The mofChildren that were found for the Translator on the Target
- * @return
- */
- private boolean shouldRenderDomPath(EObject target, Translator currentChildTranslator, List mofChildren) {
- return !currentChildTranslator.isEmptyContentSignificant() || (currentChildTranslator.shouldRenderEmptyDOMPath(target) || mofChildren.size() > 0);
- }
-
- /**
- * openDomPathIfNecessary will write the current DOM Path to the serialization stream if it has
- * not been written by a previous peer translator. The processing results in the collapse of
- * Peer Translators with matching DOM Paths into a single XML parent element.
- *
- * @param handler
- * The ContentHandler which is writing the XML result
- * @param hints
- * A Global container for information specific to a single XML document
- * @param currentChildTranslator
- * The active Translator being processed
- * @param target
- * The EMF Target of the Translation
- * @throws SAXException
- */
- private void openDomPathIfNecessary(ContentHandler handler, WriterHints hints, Translator currentChildTranslator, EObject target, List mofChildren) throws SAXException {
-
- /* If the translator does not have a DOM Path, then we do nothing */
- if (currentChildTranslator.hasDOMPath() && shouldRenderDomPath(target, currentChildTranslator, mofChildren)) {
-
- String childDomPath = currentChildTranslator.getDOMPath();
-
- /*
- * IsDomPathActive() will verify whether this DOM Path has already been written to the
- * XML stream
- */
- if (!hints.isDomPathActive(childDomPath)) {
-
- /*
- * Write an open element for the DOM Path and "remember" that we have written it
- */
- handler.startElement(NAMESPACE, childDomPath, childDomPath, EMPTY_ATTRIBUTES);
- hints.pushDomPath(childDomPath);
- }
-
- }
- }
-
- /**
- * closeDomPathIfNecessary will determine whether the next peer Translator shares the active DOM
- * Path of the current Translator. If the next peer Translator has the same DOM Path, no action
- * will be taken (hence condensing the elements into a single XML parent). However, if the DOM
- * Path differs (including the Next Peer Translator has no DOM Path) then the current DOM Path
- * will be closed (a close XML element is generated.
- *
- * @param handler
- * The ContentHandler which is writing the XML result
- * @param hints
- * A Global container for information specific to a single XML document
- * @param currentChildTranslator
- * The last Translator to have completed processing
- * @param nextTranslator
- * The next peer Translator that will become active
- * @param target
- * The EMF Target of the Translation
- * @throws SAXException
- */
- private void closeDomPathIfNecessary(ContentHandler handler, WriterHints hints, Translator currentChildTranslator, Translator nextTranslator, EObject target, List mofChildren) throws SAXException {
-
- if (currentChildTranslator.hasDOMPath() && shouldRenderDomPath(target, currentChildTranslator, mofChildren)) {
- String childDomPath = currentChildTranslator.getDOMPath();
- if (nextTranslator != null) { /*
- * There are more peers after this element, we can peek
- * ahead
- */
- String nextPeerDomPath = nextTranslator.getDOMPath();
- if (nextPeerDomPath == null || !nextPeerDomPath.equals(childDomPath)) {
- handler.endElement(NAMESPACE, childDomPath, childDomPath);
- hints.popDomPath();
- }
-
- } else { /* This was the last child element, we must close the dompath */
- handler.endElement(NAMESPACE, childDomPath, childDomPath);
- hints.popDomPath();
- }
- }
- }
-
- /**
- * Aggregate the Attribute translator children from a given translator. This method will request
- * the AttributesImpl object from the WriterHints object. The WriterHints maintains this
- * reusable collection to limit the requirement for new object creation.
- *
- * @param translator
- * @param target
- * @param hints
- * @return an initialized set of Attributes for the given Translator and EMF Target
- */
- private Attributes getAttributes(Translator translator, EObject target, WriterHints hints) {
-
- AttributesImpl attributes = hints.getAttributeHolder();
- int version = hints.getVersion();
- Object rawValue = null;
- String convertedValue = null;
- String childDomName = null;
- Translator attributeTranslator = null;
- int[] processingHints = TranslatorFilter.createProcessingHints();
-
- while ((attributeTranslator = TranslatorFilter.getNextAttributeTranslator(translator, processingHints[TranslatorFilter.NEXT_START_HINT_INDX], processingHints, target, version)) != null) {
-
- List mofChildren = attributeTranslator.getMOFChildren(target);
- if (mofChildren.size() > 0) {
- for (int j = 0; j < mofChildren.size(); j++) {
-
- childDomName = attributeTranslator.getDOMName(target);
- rawValue = mofChildren.get(j);
- convertedValue = attributeTranslator.convertValueToString(rawValue, target);
- convertedValue = XMLEncoderDecoder.escape(convertedValue);
- attributes.addAttribute(NAMESPACE, childDomName, childDomName, "String", convertedValue); //$NON-NLS-1$
- }
-
- } else {
- childDomName = attributeTranslator.getDOMName(target);
- convertedValue = (String) attributeTranslator.getMOFValue(target);
- if (convertedValue != null)
- attributes.addAttribute(NAMESPACE, childDomName, childDomName, "String", convertedValue); //$NON-NLS-1$
- }
- }
- return attributes;
- }
-
- /**
- * WriterHints is used to "remember" certain pieces of information while the writer is
- * processing. Of particular interest are the version and the state of the DOM Path output.
- * Consecutive elements with consistent (identical) DOM Paths are collapsed under a single XML
- * element.
- *
- * The WriterHints provides global state between recursive invocations of serialize(). It should
- * be not be used to store local data (e.g. data that is only relevant to a single Translator in
- * a given context).
- *
- * The WriterHints also stores an AttributesImpl object that is re-used to store attributes. The
- * getAttributes() method will request the Attributes Holder.
- *
- * @author mdelder
- */
- public final class WriterHints {
- private final TranslatorResource resource;
- private final Stack domStack = new Stack();
- private final AttributesImpl attributesImpl = new AttributesImpl();
-
- public WriterHints(TranslatorResource res) {
- this.resource = res;
- }
-
- /**
- * Push a new domPath onto the stack
- *
- * @param domPath
- * a DOMPath which has been written to the XML stream
- */
- public void pushDomPath(String domPath) {
-
- if (domPath != null && domPath.length() > 0)
- domStack.push(domPath);
- }
-
- /**
- * Pop the current domPath from the Array
- */
- public void popDomPath() {
-
- if (!domStack.isEmpty())
- domStack.pop();
- }
-
- /**
- * Determines if the given DOMPath has already been written to the XML stream
- *
- * @param domPath
- * @return true if the given DOMPath has already been written to the XML stream
- */
- public boolean isDomPathActive(String domPath) {
- boolean result = false;
- if (!domStack.isEmpty()) {
-
- String currentDomPath = (String) domStack.peek();
- if (currentDomPath != null && domPath != null)
- result = currentDomPath.equals(domPath);
- else if (!(currentDomPath == null ^ domPath == null))
- result = true;
- }
-
- return result;
- }
-
- /**
- * @return the version of the EMF Resource
- */
- public int getVersion() {
- return this.resource.getVersionID();
- }
-
- /**
- * Returns an empty AttributesImpl object to store attributes. Within the context of a given
- * WriterHints object (and hence single XML document), the object returned is a singleton.
- * The same AttributesImpl object is cleared and reused for each invocation.
- *
- * @return an empty AttributesImpl object to store attributes
- */
- public AttributesImpl getAttributeHolder() {
- this.attributesImpl.clear();
- return this.attributesImpl;
- }
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/FileNameResourceFactoryRegistry.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/FileNameResourceFactoryRegistry.java
deleted file mode 100644
index bdfd479a7..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/FileNameResourceFactoryRegistry.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.Resource.Factory;
-import org.eclipse.wst.common.internal.emf.utilities.DefaultOverridableResourceFactoryRegistry;
-
-
-public abstract class FileNameResourceFactoryRegistry extends DefaultOverridableResourceFactoryRegistry {
- //We are using two lists instead of a Map because we need to iterate
- //the list of simpleFileNames quite a lot.
- protected List simpleFileNames;
- protected List simpleFileNameFactories;
-
- public FileNameResourceFactoryRegistry() {
- super();
- }
-
- /**
- * Return a Resource.Factory that is registered with the last segment of the URI's file name.
- *
- * @see org.eclipse.emf.ecore.resource.impl.ResourceFactoryRegistryImpl#getFactory(URI)
- */
- protected Object getFileNameFactory(URI uri) {
- if (simpleFileNames != null) {
- String fileName = uri.lastSegment();
- if (fileName != null) {
- String key;
- for (int i = 0; i < simpleFileNames.size(); i++) {
- key = (String) simpleFileNames.get(i);
- if (fileName.equals(key))
- return simpleFileNameFactories.get(i);
- }
- }
- }
- return null;
- }
-
- public Resource.Factory getFactory(URI uri) {
- Object resourceFactory = getFileNameFactory(uri);
- if (resourceFactory == null)
- resourceFactory = super.getFactory(uri);
- return (Resource.Factory) resourceFactory;
- }
-
- /**
- * Register a file name representing the last segment of a URI with the corresponding
- * Resource.Factory.
- */
- public void registerLastFileSegment(String aSimpleFileName, Resource.Factory aFactory) {
- URI uri = URI.createURI(aSimpleFileName);
- String lastSegment = uri.lastSegment();
- int index = getFileNameIndexForAdd(lastSegment);
- setFileName(lastSegment, index);
- setFileNameFactory(aFactory, index);
- }
-
- private int getFileNameIndexForAdd(String aSimpleFileName) {
- if (simpleFileNames != null) {
- int i = simpleFileNames.indexOf(aSimpleFileName);
- if (i > -1)
- return i;
- return simpleFileNames.size();
- }
- return 0;
- }
-
- private void setFileNameFactory(Factory aFactory, int index) {
- if (simpleFileNameFactories == null)
- simpleFileNameFactories = new ArrayList();
- simpleFileNameFactories.add(index, aFactory);
- }
-
- private void setFileName(String aSimpleFileName, int index) {
- if (simpleFileNames == null)
- simpleFileNames = new ArrayList();
- simpleFileNames.add(index, aSimpleFileName);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/GenericTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/GenericTranslator.java
deleted file mode 100644
index eafe09f36..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/GenericTranslator.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 20, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * Specialized translator for objects that contain simple mappings with no specialized behavior.
- */
-public class GenericTranslator extends Translator {
-
- protected Translator[] children;
-
- /**
- * @param domNameAndPath
- * @param eClass
- */
- public GenericTranslator(String domNameAndPath, EClass eClass) {
- super(domNameAndPath, eClass);
- }
-
- /**
- * @param domNameAndPath
- * @param aFeature
- */
- public GenericTranslator(String domNameAndPath, EStructuralFeature aFeature) {
- super(domNameAndPath, aFeature);
- }
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param path
- */
- public GenericTranslator(String domNameAndPath, EStructuralFeature aFeature, TranslatorPath path) {
- super(domNameAndPath, aFeature, path);
- }
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param paths
- */
- public GenericTranslator(String domNameAndPath, EStructuralFeature aFeature, TranslatorPath[] paths) {
- super(domNameAndPath, aFeature, paths);
- }
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param eClass
- */
- public GenericTranslator(String domNameAndPath, EStructuralFeature aFeature, EClass eClass) {
- super(domNameAndPath, aFeature, eClass);
- }
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param style
- */
- public GenericTranslator(String domNameAndPath, EStructuralFeature aFeature, int style) {
- super(domNameAndPath, aFeature, style);
- }
-
- /**
- * @return Translator[]
- */
- public Translator[] getChildren() {
- return children;
- }
-
- /**
- * Sets the children.
- *
- * @param children
- * The children to set
- */
- public void setChildren(Translator[] children) {
- this.children = children;
- }
-
-
- public static Translator appendChildren(GenericTranslator tran, Translator[] child) {
- Translator[] orgChild = tran.getChildren();
- Translator[] newChildren = (Translator[]) concat(orgChild, child);
- tran.setChildren(newChildren);
- return tran;
- }
-
- public static Translator appendChild(GenericTranslator tran, Translator child) {
- Object[] orgChild = tran.getChildren();
- Translator[] newChildren = (Translator[]) concat(orgChild, child);
- tran.setChildren(newChildren);
- return tran;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/IDTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/IDTranslator.java
deleted file mode 100644
index 15755f0e2..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/IDTranslator.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 19, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.xmi.XMIResource;
-
-/**
- * @author schacher
- */
-public class IDTranslator extends Translator {
- public class NoResourceException extends RuntimeException {
-
- public NoResourceException() {
- super();
- }
-
- public NoResourceException(String s) {
- super(s);
- }
- }
-
- static final public EStructuralFeature ID_FEATURE = EcorePackage.eINSTANCE.getEClass_EIDAttribute();
- static final public IDTranslator INSTANCE = new IDTranslator();
-
- public IDTranslator() {
- super("id", ID_FEATURE, DOM_ATTRIBUTE); //$NON-NLS-1$
- }
-
- public void setMOFValue(EObject emfObject, Object value) {
- XMIResource res = (XMIResource) emfObject.eResource();
- if (res == null)
- throw new NoResourceException();
- String id = res.getID(emfObject);
- if (id == null && value == null)
- return;
- if ((id != null && !id.equals(value)) || (value != null && !value.equals(id)))
- res.setID(emfObject, (String) value);
- }
-
- public Object getMOFValue(EObject emfObject) {
- if (emfObject == null)
- throw new NoResourceException();
- XMIResource res = (XMIResource) emfObject.eResource();
- if (res == null)
- throw new NoResourceException();
- return res.getID(emfObject);
- }
-
-
- public boolean featureExists(EObject emfObject) {
- return true;
- }
-
- public boolean isIDMap() {
- return true;
- }
-
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/LinkUpdaterTarget.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/LinkUpdaterTarget.java
deleted file mode 100644
index f5cd1f99b..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/LinkUpdaterTarget.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.w3c.dom.Node;
-
-
-public class LinkUpdaterTarget extends Object {
-
- public static final LinkUpdaterTarget INSTANCE = new LinkUpdaterTarget();
-
- /**
- * Constructor for LinkUpdaterMultiTarget.
- *
- * @param adapter
- */
- private LinkUpdaterTarget() {
- super();
- }
-
-
- public void updateDOM(Translator map, Node node, EObject mofObject) {
- refreshSourceObjects(map, node, mofObject, true);
- }
-
- public void updateMOF(Translator map, Node node, EObject mofObject) {
- refreshSourceObjects(map, node, mofObject, false);
- }
-
- protected void refreshSourceObjects(Translator map, Node node, EObject mofObject, boolean domUpdate) {
- TranslatorPath[] paths = map.getTranslatorPaths();
- for (int i = 0; i < paths.length; i++) {
- TranslatorPath path = paths[i];
- List allSourceObjects = path.findObjects(mofObject);
- for (Iterator iter = allSourceObjects.iterator(); iter.hasNext();) {
- EObject curObject = (EObject) iter.next();
- EMF2DOMAdapter curAdapter = (EMF2DOMAdapter) EcoreUtil.getAdapter(curObject.eAdapters(), EMF2DOMAdapter.class);
- if (curAdapter != null) {
- if (domUpdate)
- curAdapter.updateDOM();
- else
- curAdapter.updateMOF();
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/MappedXMIHelper.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/MappedXMIHelper.java
deleted file mode 100644
index ac27864eb..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/MappedXMIHelper.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.URIConverter;
-import org.eclipse.emf.ecore.resource.impl.URIConverterImpl;
-import org.eclipse.emf.ecore.xmi.XMLHelper;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-import org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl;
-import org.eclipse.wst.common.internal.emf.utilities.IDUtil;
-
-public class MappedXMIHelper extends XMLHelperImpl {
-
- private static final String WORKSPACE_PROTOCOL = "workspace:/"; //$NON-NLS-1$
- private static final String PLATFORM_RESOURCE_PROTOCOL = "platform:/resource/"; //$NON-NLS-1$
- private static final EStructuralFeature NULL_FEATURE = new UnsupportedFeature();
- protected boolean usingMaps = true;
- protected Map cachedRelativeURIs;
- protected Map packageURIsToPrefixes;
-
- /**
- * Constructor for MappedXMLHelper.
- *
- * @param resource
- */
- public MappedXMIHelper(XMLResource resource, Map prefixesToURIs) {
- super(resource);
- this.prefixesToURIs.putAll(prefixesToURIs);
- pushContext(); //Needed to initialize the context to zero
- Set keys = prefixesToURIs.keySet();
- for (Iterator iter = keys.iterator(); iter.hasNext();) {
- String prefix = (String) iter.next();
- String uri = (String) prefixesToURIs.get(prefix);
- namespaceSupport.declarePrefix(prefix, uri);
- }
-
- }
-
- public URI resolve(URI relative, URI base) {
- URI resolved = null;
- boolean isMapped = false;
- ResourceSet set = getResource().getResourceSet();
- if (set != null) {
- URI localresourceURI = null;
- if (relative.hasFragment())
- localresourceURI = relative.trimFragment();
- else
- localresourceURI = relative;
- isMapped = !(((URIConverterImpl.URIMap) set.getURIConverter().getURIMap()).getURI(localresourceURI).equals(localresourceURI));
- }
- if (!isMapped) {
- if (isUsingContainerRelativePaths() && set != null)
- resolved = set.getURIConverter().normalize(relative);
- } else {
- resolved = relative;
- }
- return resolved == null ? super.resolve(relative, base) : resolved;
- }
-
- /**
- * Method isUsingContainerRelativePaths.
- *
- * @return boolean
- */
- private boolean isUsingContainerRelativePaths() {
- return ((CompatibilityXMIResource) resource).getFormat() == CompatibilityXMIResource.FORMAT_MOF5 || usingMaps;
- }
-
- public void addPrefix(String prefix, String uri) {
- /*
- * problem - the incoming key value pair is ejbbnd->ejbbnd.xmi; however, the map already has
- * a key value pair of ejbbnd->http:///ejbbnd.ecore
- */
- if (uri.endsWith(".ecore")) { //$NON-NLS-1$
- usingMaps = false;
- }
- String existing = (String) prefixesToURIs.get(prefix);
- if (existing == null) {
- prefixesToURIs.put(prefix, uri);
- namespaceSupport.declarePrefix(prefix, uri);
- } else if (!existing.equals(uri)) {
- getCompatibilityResource().addOriginalPackageURI(existing, uri);
- getCompatibilityResource().setFormat(CompatibilityXMIResource.FORMAT_MOF5);
- }
- }
-
- protected CompatibilityXMIResource getCompatibilityResource() {
- return (CompatibilityXMIResource) getResource();
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl#getHREF(EObject)
- */
- public String getHREF(EObject obj) {
- if (!getCompatibilityResource().usesDefaultFormat()) {
- URIConverter conv = getURIConverter();
- if (conv != null && conv instanceof CompatibilityURIConverter) {
- String href = getCompatibliltyHREF(obj, (CompatibilityURIConverter) conv);
- return useWorkspaceProtocolIfNecessary(href);
- }
- }
- return super.getHREF(obj);
- }
-
-
- /**
- * @param href
- * @return
- */
- protected String useWorkspaceProtocolIfNecessary(String href) {
- if (href != null && href.startsWith(PLATFORM_RESOURCE_PROTOCOL))
- return WORKSPACE_PROTOCOL + href.substring(19);
- return href;
- }
-
- private String getCompatibliltyHREF(EObject obj, CompatibilityURIConverter conv) {
- //Implementation copied from super.getHREF(EObject)
- InternalEObject o = (InternalEObject) obj;
-
- URI objectURI = o.eProxyURI();
- if (objectURI == null) {
- Resource otherResource = obj.eResource();
- if (otherResource == null) {
- objectURI = handleDanglingHREF(obj);
- if (objectURI == null) {
- return null;
- }
- } else
- objectURI = otherResource.getURI().appendFragment(otherResource.getURIFragment(obj));
- }
-
- //Modified to dispatch back to URI Converter
- if (!objectURI.isRelative()) {
- objectURI = makeRelative(objectURI, conv);
- }
- return objectURI.toString();
- }
-
- protected URI makeRelative(URI objectURI, CompatibilityURIConverter conv) {
- String fragment = objectURI.fragment();
- objectURI = objectURI.trimFragment();
- URI relative = (URI) getCachedRelativeURIs().get(objectURI);
- if (relative == null) {
- relative = conv.deNormalize(objectURI);
- if (relative.isRelative())
- cachedRelativeURIs.put(objectURI, relative);
- }
- return relative.appendFragment(fragment);
- }
-
- protected URIConverter getURIConverter() {
- ResourceSet set = getResource().getResourceSet();
- if (set != null)
- return set.getURIConverter();
- return null;
- }
-
- protected Map getCachedRelativeURIs() {
- if (cachedRelativeURIs == null)
- cachedRelativeURIs = new HashMap();
- return cachedRelativeURIs;
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl#getID(EObject)
- */
- public String getID(EObject obj) {
- if (getCompatibilityResource().usesDefaultFormat())
- return super.getID(obj);
- return IDUtil.getOrAssignID(obj, resource);
- }
-
- public String[] getNSInfo(EPackage pkg) {
- String prefix = getMappedPrefix(pkg);
- if (prefix == null)
- return new String[]{pkg.getNsPrefix(), pkg.getNsURI()};
- return new String[]{prefix, prefix + ".xmi"}; //$NON-NLS-1$
- }
-
- protected String getMappedPrefix(EPackage pkg) {
- String nsURI = pkg.getNsURI();
- if (usingMaps || !getCompatibilityResource().usesDefaultFormat())
- return (String) packageURIsToPrefixes.get(nsURI);
- return null;
- }
-
- protected String getMappedPrefixOrDefault(EPackage pkg) {
- String prefix = getMappedPrefix(pkg);
- return prefix == null ? pkg.getNsPrefix() : prefix;
- }
-
-
- /**
- * Returns the packageURIsToPrefixes.
- *
- * @return Map
- */
- public Map getPackageURIsToPrefixes() {
- return packageURIsToPrefixes;
- }
-
- /**
- * Sets the packageURIsToPrefixes.
- *
- * @param packageURIsToPrefixes
- * The packageURIsToPrefixes to set
- */
- public void setPackageURIsToPrefixes(Map packageURIsToPrefixes) {
- this.packageURIsToPrefixes = packageURIsToPrefixes;
- }
-
- public String getQName(EClass c) {
- String name = getName(c);
-
- if (xmlMap != null) {
- XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c);
-
- if (clsInfo != null) {
- String targetNamespace = clsInfo.getTargetNamespace();
- return getQName(targetNamespace, name);
- }
- }
-
- EPackage p = c.getEPackage();
- packages.put(p, null);
-
- if (p.getNsPrefix().equals("")) //$NON-NLS-1$
- return name;
-
- //Modified from superclass
- //return p.getNsPrefix() + ":" + name;
- return getMappedPrefixOrDefault(p) + ":" + name; //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl#setValue(EObject, EStructuralFeature,
- * Object, int)
- */
- public void setValue(EObject object, EStructuralFeature feature, Object value, int position) {
- if (feature == NULL_FEATURE)
- return;
- if (!feature.isTransient()) {
- if (value == null && feature.getEType().getInstanceClass() != null && feature.getEType().getInstanceClass().isPrimitive())
- //For compatibility with MOF5 where types like Integer might have been set
- //and serialized as "xsi:nil"
- return;
-
- super.setValue(object, feature, value, position);
- }
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.XMLHelper#getFeature(org.eclipse.emf.ecore.EClass,
- * java.lang.String, java.lang.String, boolean)
- */
- public EStructuralFeature getFeature(EClass eClass, String namespaceURI, String name, boolean isElement) {
- if (UnsupportedFeature.isUnsupported(eClass, name))
- return NULL_FEATURE;
- return super.getFeature(eClass, namespaceURI, name, isElement);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.XMLHelper#getFeatureKind(org.eclipse.emf.ecore.EStructuralFeature)
- */
- public int getFeatureKind(EStructuralFeature feature) {
- if (feature == NULL_FEATURE)
- return XMLHelper.DATATYPE_SINGLE;
- return super.getFeatureKind(feature);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/MultiObjectTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/MultiObjectTranslator.java
deleted file mode 100644
index abfcc8334..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/MultiObjectTranslator.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 31, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * @author schacher
- */
-public abstract class MultiObjectTranslator extends Translator {
- private static final Translator[] EMPTY_TRANSLATORS = new Translator[]{};
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param style
- */
- public MultiObjectTranslator(String domNameAndPath, EStructuralFeature aFeature) {
- super(domNameAndPath, aFeature);
- }
-
- public abstract Translator getDelegateFor(EObject o);
-
- public abstract Translator getDelegateFor(String domName, String readAheadName);
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#createEMFObject(java.lang.String,
- * java.lang.String)
- */
- public EObject createEMFObject(String nodeName, String readAheadName) {
- return getDelegateFor(nodeName, readAheadName).createEMFObject(nodeName, readAheadName);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#getChildren(java.lang.Object)
- */
- public Translator[] getChildren(Object o, int version) {
- if (o == null)
- return EMPTY_TRANSLATORS;
- return getDelegateFor((EObject) o).getChildren(o, version);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#getDOMName(java.lang.Object)
- */
- public String getDOMName(Object value) {
- return getDelegateFor((EObject) value).getDOMName(value);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#isManagedByParent()
- */
- public boolean isManagedByParent() {
- return false;
- }
-
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/NamespaceTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/NamespaceTranslator.java
deleted file mode 100644
index b266883e3..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/NamespaceTranslator.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Aug 14, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.wst.common.internal.emf.utilities.Namespace;
-import org.eclipse.wst.common.internal.emf.utilities.NamespaceAdapter;
-
-
-/**
- * @author schacher
- */
-public class NamespaceTranslator extends Translator {
-
- protected String prefix;
-
- /**
- * @param domNameAndPath
- * @param aFeature
- */
- public NamespaceTranslator(String domName) {
- super(domName, NamespaceAdapter.NOTIFICATION_FEATURE, DOM_ATTRIBUTE);
- initPrefix();
- }
-
- private void initPrefix() {
- String dName = getDOMName(null);
- prefix = dName.substring(DefaultTranslatorFactory.XMLNS.length());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#setMOFValue(org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- public void setMOFValue(EObject emfObject, Object value) {
- NamespaceAdapter.addNamespace(prefix, (String) value, emfObject);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#isSetMOFValue(org.eclipse.emf.ecore.EObject)
- */
- public boolean isSetMOFValue(EObject emfObject) {
- return getMOFValue(emfObject) != null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#getMOFValue(org.eclipse.emf.ecore.EObject)
- */
- public Object getMOFValue(EObject mofObject) {
- return NamespaceAdapter.getNamespaceURIAtThisLevel(prefix, mofObject);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#unSetMOFValue(org.eclipse.emf.ecore.EObject)
- */
- public void unSetMOFValue(EObject emfObject) {
- NamespaceAdapter.removeNamespace(prefix, emfObject);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#featureExists(org.eclipse.emf.ecore.EObject)
- */
- public boolean featureExists(EObject emfObject) {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#isDataType()
- */
- public boolean isDataType() {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#isMapFor(java.lang.Object, java.lang.Object,
- * java.lang.Object)
- */
- public boolean isMapFor(Object aFeature, Object oldValue, Object newValue) {
- if (aFeature == feature) {
- Namespace namespace = (Namespace) (oldValue == null ? newValue : oldValue);
- if (namespace != null)
- return prefix.equals(namespace.getPrefix());
- }
- return false;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ObjectTranslatorFilter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ObjectTranslatorFilter.java
deleted file mode 100644
index 918b9ce85..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ObjectTranslatorFilter.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-/*
- * Created on Sep 21, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-public final class ObjectTranslatorFilter extends TranslatorFilter {
-
- public ObjectTranslatorFilter() {
- super(null, -1);
- }
-
- public ObjectTranslatorFilter(Translator trans, int version) {
- super(trans, version);
- }
-
- public final int scanNextTranslator(Translator[] children, int start) {
- int found = start + 1;
- for (; found < children.length; ++found) {
- if (!children[found].isDOMAttribute())
- break;
- }
- found = (found < children.length) ? found : -1;
- return found;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReadAheadHelper.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReadAheadHelper.java
deleted file mode 100644
index a7d1a23f8..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReadAheadHelper.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 2, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-/**
- * @author schacher
- */
-public class ReadAheadHelper {
-
- protected String parentDOMName;
- protected String[] values;
- protected String childDOMName;
-
- public ReadAheadHelper(String parentDOMName, String[] values, String childDOMName) {
- super();
- this.parentDOMName = parentDOMName;
- this.values = values;
- this.childDOMName = childDOMName;
- }
-
- /**
- * @return
- */
- public String getChildDOMName() {
- return childDOMName;
- }
-
- /**
- * @return
- */
- public String getParentDOMName() {
- return parentDOMName;
- }
-
- /**
- * @return
- */
- public String[] getValues() {
- return values;
- }
-
- /**
- * @param string
- */
- public void setChildDOMName(String string) {
- childDOMName = string;
- }
-
- /**
- * @param string
- */
- public void setParentDOMName(String string) {
- parentDOMName = string;
- }
-
- /**
- * @param strings
- */
- public void setValues(String[] strings) {
- values = strings;
- }
-
-
- public boolean nodeValueIsReadAheadName(String nodeName) {
-
- return (childDOMName != null) ? childDOMName.equals(nodeName) : false;
- }
-
- public boolean nodeNameIsReadAheadName(String nodeName) {
- boolean result = false;
- for (int i = 0; i < values.length; i++) {
- if (nodeName.equals(values[i])) {
- result = true;
- break;
- }
- }
- return result;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedResource.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedResource.java
deleted file mode 100644
index fc8ceaf1e..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedResource.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-public interface ReferencedResource extends Resource, CompatibilityXMIResource {
- //TODO - rename packaged
-
- public static final String DELETED_ERROR_MSG = "This resource has been deleted and can no longer be used."; //$NON-NLS-1$
-
- public static final int RESOURCE_WAS_SAVED = 601;
-
- /**
- * Access this resource for read only. This call increments the use read count of this resource.
- * Clients should call this method before they use the resource. They should call
- * releaseFromRead() after they are done modifying this resource.
- */
- void accessForRead();
-
- /**
- * Access this resource for write only. This call increments the use write count of this
- * resource. Clients should call this method before they modify the resource. They should call
- * releaseFromWrite() after they are done modifying this resource.
- */
- void accessForWrite();
-
- /**
- * Return true if this resource has just been loaded and not yet accessed for read or write.
- */
- boolean isNew();
-
- /**
- * Return true if this resource does not have any write references.
- */
- boolean isReadOnly();
-
- /**
- * Return true if this resource is shared for read or write by more than one accessor.
- */
- boolean isShared();
-
- /**
- * Return true if this resource is shared for write by more than one accessor.
- */
- boolean isSharedForWrite();
-
- /**
- * Release read the access to this resource. This call decrements the use count of this resource
- * and will remove the resource from its resource set if the use count goes to 0. Clients should
- * call this method when they are done accessing the resource and only after they have called
- * accessForRead() to obtain access.
- */
- void releaseFromRead();
-
- /**
- * Release write the access to this resource. This call decrements the write count of this
- * resource and will remove the resource from its resource set if the use count goes to 0.
- * Clients should call this method when they are done accessing the resource and only after they
- * have called accessForWrite() to obtain access.
- */
- void releaseFromWrite();
-
- /**
- * Saves this resource only if the write count is equal to 1.
- */
- void saveIfNecessary() throws Exception;
-
- /**
- * Return true if this resource is dirty and is not shared for write.
- */
- boolean needsToSave();
-
-
-
- /**
- * Set whether we should allow a refresh to take place even when this resource is dirty.
- *
- * @param b
- */
- void setForceRefresh(boolean b);
-
- /**
- * Return whether we should allow a refresh to take place even when this resource is dirty.
- */
- boolean shouldForceRefresh();
-
- boolean wasReverted();
-
- /**
- * Returns the number of open read accesses on this resource
- *
- * @return
- */
- int getReadCount();
-
- /**
- * Returns the number of open write accesses on this resource
- *
- * @return
- */
- int getWriteCount();
-
- /**
- * If the resource is no longer being accessed, then remove it from the resource set.
- */
- void unloadIfNecessary();
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIFactoryImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIFactoryImpl.java
deleted file mode 100644
index d891c2cda..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIFactoryImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
-
-public class ReferencedXMIFactoryImpl extends ResourceFactoryImpl {
-
- protected static List globalAdapterFactories;
- protected List localAdapterFactories;
-
- /**
- * ReferencedXMIFactoryImpl constructor comment.
- */
- public ReferencedXMIFactoryImpl() {
- super();
- }
-
- /**
- * This is the method that subclasses can override to actually instantiate a new Resource
- *
- * @param uri
- * @return
- */
- protected Resource doCreateResource(URI uri) {
- return new ReferencedXMIResourceImpl(uri);
- }
-
- /**
- * @see org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl#createResource(URI)
- */
- public final Resource createResource(URI uri) {
- Resource res = doCreateResource(uri);
- adaptNew(res);
- return res;
- }
-
- protected void adaptNew(Resource res) {
- if (globalAdapterFactories != null) {
- for (int i = 0; i < globalAdapterFactories.size(); i++) {
- AdapterFactory factory = (AdapterFactory) globalAdapterFactories.get(i);
- factory.adaptAllNew(res);
- }
- }
- if (localAdapterFactories != null) {
- for (int i = 0; i < localAdapterFactories.size(); i++) {
- AdapterFactory factory = (AdapterFactory) localAdapterFactories.get(i);
- factory.adaptAllNew(res);
- }
- }
- }
-
- /**
- * The local adapter factory is an adapter factory that you use to only adapt the resource
- * specific to the ResourceFactory instance.
- *
- * @param factory
- */
- public void addLocalAdapterFactory(AdapterFactory factory) {
- if (localAdapterFactories == null)
- localAdapterFactories = new ArrayList(3);
- localAdapterFactories.add(factory);
- }
-
- public void removeLocalAdapterFactory(AdapterFactory factory) {
- if (localAdapterFactories != null)
- localAdapterFactories.remove(factory);
- }
-
- /**
- * A global adapter factory will be used to adapt any resource created by any ResourceFactory
- * instance.
- *
- * @param factory
- */
- public static void addGlobalAdapterFactory(AdapterFactory factory) {
- if (globalAdapterFactories == null)
- globalAdapterFactories = new ArrayList(3);
- globalAdapterFactories.add(factory);
- }
-
- public static void removeGlobalAdapterFactory(AdapterFactory factory) {
- if (globalAdapterFactories != null)
- globalAdapterFactories.remove(factory);
- }
-}
-
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIResourceImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIResourceImpl.java
deleted file mode 100644
index 83b9e6dc9..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIResourceImpl.java
+++ /dev/null
@@ -1,386 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.NotificationImpl;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.wst.common.internal.emf.utilities.IDUtil;
-
-public class ReferencedXMIResourceImpl extends CompatibilityXMIResourceImpl implements ReferencedResource {
- //TODO Add toString hook
- private static final String TO_STRING = "ReferencedXMIResource, file = "; //$NON-NLS-1$
- private static final String READ_COUNT_TO_STRING = " R= "; //$NON-NLS-1$
- private static final String WRITE_COUNT_TO_STRING = " W= "; //$NON-NLS-1$
-
- private int readReferenceCount = 1;
- private int editReferenceCount = 0;
- protected boolean isNew = true;
- protected boolean forceRefresh;
-
- public static class ESynchronizedAdapterList extends EAdapterList
- {
-
- public Object mutex;
-
- public ESynchronizedAdapterList(Notifier notifier) {
- super(notifier);
- mutex = this;
- }
-
- public boolean add(Object object)
- {
- synchronized (mutex) {return super.add(object);}
- }
-
- public void add(int index, Object object)
- {
- synchronized (mutex) {super.add(index, object);}
- }
-
- public boolean addAll(Collection collection)
- {
- synchronized (mutex) {return super.addAll(collection);}
- }
-
- public boolean remove(Object object)
- {
- synchronized (mutex) {return super.remove(object);}
- }
-
- public Object remove(int index)
- {
- synchronized (mutex) {return super.remove(index);}
- }
-
- public boolean removeAll(Collection collection)
- {
- synchronized (mutex) {return super.removeAll(collection);}
- }
-
- public void clear()
- {
- synchronized (mutex) {super.clear();};
- }
-
-
- public Object set(int index, Object object)
- {
- synchronized (mutex) {return super.set(index, object);}
- }
-
- public void move(int newPosition, Object object)
- {
- synchronized (mutex) {super.move(newPosition, object);}
- }
-
- public Object move(int newPosition, int oldPosition)
- {
- synchronized (mutex) {return super.move(newPosition, oldPosition);}
- }
- }
-
-
- /**
- * ReferencableXMIResourceImpl constructor comment.
- */
- public ReferencedXMIResourceImpl() {
- super();
- }
-
- public ReferencedXMIResourceImpl(URI uri) {
- super(uri);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.internal.emf.resource.ReferencedResource#getReadCount()
- */
- public int getReadCount() {
- return readReferenceCount;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.internal.emf.resource.ReferencedResource#getWriteCount()
- */
- public int getWriteCount() {
- return editReferenceCount;
- }
-
-
-
- /*
- * @see ReferencedResource#accessForRead
- */
- public void accessForRead() {
- checkDeleted();
- if (!isNew())
- readReferenceCount++;
- isNew = false;
- }
-
- /*
- * @see ReferencedResource#accessForWrite
- */
- public void accessForWrite() {
- checkDeleted();
- editReferenceCount++;
- if (isNew)
- releaseFromRead();
- isNew = false;
- if (!isTrackingModification())
- setTrackingModification(true);
- }
-
- /*
- * Check if this resource has been removed and throw an exception if it does not have a
- * ResourceSet.
- */
- protected void checkDeleted() {
- if (getResourceSet() == null)
- throw new RuntimeException(DELETED_ERROR_MSG);
- }
-
- /**
- *
- */
- public void collectContainedObjects(java.util.List collecting, EObject parentObject) {
-
- java.util.Iterator children = parentObject.eContents().iterator();
- while (children.hasNext()) {
- EObject child = (EObject) children.next();
- collecting.add(child);
- collectContainedObjects(collecting, child);
- }
- }
-
- /**
- *
- */
- public void ensureFullIDHydration() {
- List allRefObjects = new ArrayList();
- Iterator rootObjects = getContents().iterator();
- while (rootObjects.hasNext()) {
- EObject child = (EObject) rootObjects.next();
- allRefObjects.add(child);
- collectContainedObjects(allRefObjects, child);
- }
-
- Iterator iter = allRefObjects.iterator();
- while (iter.hasNext())
- IDUtil.assignID((EObject) iter.next(), this);
- }
-
- /**
- * If the resource is no longer being accessed, then remove it from the resource set.
- */
- public void unloadIfNecessary() {
- if ((getTotalReferenceCount() <= 0) || (editReferenceCount <= 0 && isModified()))
- unload();
- }
-
- /**
- * Return the number of write accesses to this resource.
- *
- * @return int The number of references.
- */
- protected int getTotalReferenceCount() {
- return editReferenceCount + readReferenceCount;
- }
-
- /*
- * @see ReferencedResource#isNew
- */
- public boolean isNew() {
- return isNew;
- }
-
- /*
- * @see ReferencedResource#isReadOnly
- */
- public boolean isReadOnly() {
- return editReferenceCount <= 0;
- }
-
- /*
- * @see ReferencedResource#isShared
- */
- public boolean isShared() {
- return getTotalReferenceCount() > 1;
- }
-
- /*
- * @see ReferencedResource#isSharedForWrite
- */
- public boolean isSharedForWrite() {
- return editReferenceCount > 1;
- }
-
- /**
- * @see ReferencedResource#preDelete
- */
- public void preDelete() {
- }
-
- /*
- * @see ReferencedResource#releaseFromRead
- */
- public void releaseFromRead() {
- readReferenceCount--;
- if (readReferenceCount < 0)
- throw new RuntimeException("Read reference count error: " + this.toString()); //$NON-NLS-1$
- unloadIfNecessary();
- }
-
- /*
- * @see ReferencedResource#releaseFromWrite
- */
- public void releaseFromWrite() {
- editReferenceCount--;
- if (editReferenceCount < 0)
- throw new RuntimeException("Write reference count error: " + this.toString()); //$NON-NLS-1$
- unloadIfNecessary();
- }
-
- /*
- * @see ReferencedResource#saveIfNecessary
- */
- public void saveIfNecessary() throws Exception {
- if (!isSharedForWrite()) // caller is the only referencer
- save(Collections.EMPTY_MAP);
- }
-
- public String toString() {
- return TO_STRING + getURI().toString() + READ_COUNT_TO_STRING + new Integer(readReferenceCount) + WRITE_COUNT_TO_STRING + new Integer(editReferenceCount);
- }
-
- /*
- * @see ReferencedResource#needsToSave()
- */
- public boolean needsToSave() {
- return isModified() && !isSharedForWrite();
- }
-
-
- /**
- * @see ReferencedResource#setForceRefresh(boolean)
- */
- public void setForceRefresh(boolean b) {
- forceRefresh = b;
- }
-
- /**
- * @see ReferencedResource#shouldForceRefresh()
- */
- public boolean shouldForceRefresh() {
- return forceRefresh;
- }
-
- protected void basicDoLoad(InputStream arg0, Map arg1) throws IOException {
- boolean isTrackingMods = isTrackingModification();
- try {
- if (isTrackingMods)
- setTrackingModification(false);
- super.basicDoLoad(arg0, arg1);
- } finally {
- if (isTrackingMods)
- setTrackingModification(true);
- }
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#doUnload()
- */
- protected void doUnload() {
- if (isTrackingModification() && editReferenceCount < 1) //do not turn off modification if
- // we still have a write count
- setTrackingModification(false);
- super.doUnload();
- setForceRefresh(false);
- setModified(false); //dcb - this is required to ensure that resources without files are
- // marked as not modified.
- if (readReferenceCount == 0 && editReferenceCount == 0)
- resetAsNew();
- }
-
-
- /**
- * The resource has been unloaded, and there are no references. Treat the resource like a new
- * Resource
- */
- private void resetAsNew() {
- readReferenceCount = 1;
- isNew = true;
- }
-
- /**
- * @see Resource#save(Object)
- */
- public void save(Map options) throws IOException {
- super.save(options);
- notifySaved();
- }
-
- protected void notifySaved() {
- if (eNotificationRequired()) {
- Notification notification = new NotificationImpl(RESOURCE_WAS_SAVED, this, this) {
- public Object getNotifier() {
- return ReferencedXMIResourceImpl.this;
- }
-
- public int getFeatureID(Class expectedClass) {
- return RESOURCE_WAS_SAVED;
- }
- };
- eNotify(notification);
- }
- }
-
-
- /**
- * @see com.ibm.etools.emf.workbench.ReferencedResource#wasReverted()
- */
- public boolean wasReverted() {
- return false;
- }
-
- public EList eAdapters()
- {
- if (eAdapters == null)
- {
- eAdapters = new ESynchronizedAdapterList(this);
- }
- return eAdapters;
- }
-
-
- public void eNotify(Notification notification) {
- synchronized (eAdapters()) {
- super.eNotify(notification);
- }
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Renderer.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Renderer.java
deleted file mode 100644
index 6768cd178..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Renderer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Map;
-
-/**
- * Interface that defines the api for rendering an EMF object to XML and vice versa
- */
-public interface Renderer {
-
- public static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; //$NON-NLS-1$
-
- public static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema"; //$NON-NLS-1$
-
- void setResource(TranslatorResource aResource);
-
- TranslatorResource getResource();
-
- void doLoad(InputStream in, Map options) throws IOException;
-
- void doSave(OutputStream outputStream, Map options) throws IOException;
-
- boolean useStreamsForIO();
-
- void prepareToAddContents();
-
- int getVersionID();
-
- boolean isModified();
-
- void accessForWrite();
-
- void accessForRead();
-
- void releaseFromRead();
-
- void releaseFromWrite();
-
- void preDelete();
-
- void preUnload();
-
- boolean isShared();
-
- boolean isSharedForWrite();
-
- void setBatchMode(boolean isBatch);
-
- boolean isBatchMode();
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RendererFactory.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RendererFactory.java
deleted file mode 100644
index 9f294d32a..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RendererFactory.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-
-public abstract class RendererFactory {
-
- public abstract Renderer createRenderer();
-
- private static RendererFactory defaultRendererFactory;
-
- private static RendererFactoryDefaultHandler defaultHandler;
-
- private boolean validating = true;
-
- /**
- * Interested parties can use the
- */
- public final static Notifier NotificationEngine = Notifier.INSTANCE;
-
- /**
- * @return
- */
- public static RendererFactory getDefaultRendererFactory() {
- if (defaultRendererFactory == null)
- defaultRendererFactory = getDefaultHandler().getDefaultRendererFactory();
- return defaultRendererFactory;
- }
-
- /**
- * @param factory
- */
- public static void setDefaultRendererFactory(RendererFactory factory) {
-
- //System.out.println("\n\n***Setting factory: " + factory);
- NotificationEngine.notifyListeners(factory);
- defaultRendererFactory = factory;
- }
-
- public String toString() {
- return "RendererFactory instance: " + getClass().getName(); //$NON-NLS-1$
- }
-
- public static class Notifier {
-
- private static final Notifier INSTANCE = new Notifier();
-
- private final Collection resourceFactoryListeners = new ArrayList();
-
- private Notifier() {
- }
-
- public void notifyListeners(RendererFactory rendererFactory) {
-
- final int length = resourceFactoryListeners.size();
- //System.out.println("Notifying " + length + " listeners");
-
- if (length > 0) {
- /*
- * Since the renderer factories are singletons, this reference check should always
- * work
- */
- if (rendererFactory != RendererFactory.getDefaultRendererFactory()) {
- WeakReference wref = null;
- Listener listener = null;
- synchronized (resourceFactoryListeners) {
- for (Iterator i = resourceFactoryListeners.iterator(); i.hasNext();) {
- wref = (WeakReference) i.next();
- listener = (Listener) wref.get();
- //System.out.println("Notifying Listener: " + listener);
- if (listener != null)
- listener.updateRendererFactory(rendererFactory);
- else
- i.remove();
- }
- }
- }
- }
- }
-
- public void addListener(Listener l) {
- //System.out.println("Adding listener: " + l);
- synchronized (resourceFactoryListeners) {
- resourceFactoryListeners.add(new WeakReference(l));
- }
- }
-
- public void removeListener(Listener listenerToRemove) {
- final int length = resourceFactoryListeners.size();
- if (length > 0) {
- WeakReference wref = null;
- Listener listener = null;
- synchronized (resourceFactoryListeners) {
- for (Iterator i = resourceFactoryListeners.iterator(); i.hasNext();) {
- wref = (WeakReference) i.next();
- listener = (Listener) wref.get();
- if (listener != null) {
- if (listener == listenerToRemove) {
- i.remove();
- break;
- }
- } else {
- i.remove();
- }
- }
- }
- }
- }
-
- }
-
- public interface Listener {
- void updateRendererFactory(RendererFactory newRendererFactory);
- }
-
- /**
- * @return
- */
- public boolean isValidating() {
- return validating;
- }
-
- /**
- * @param b
- */
- public void setValidating(boolean b) {
- validating = b;
- }
-
- /**
- * @return
- */
- public static RendererFactoryDefaultHandler getDefaultHandler() {
- if (defaultHandler == null)
- defaultHandler = EMF2DOMRendererFactoryDefaultHandler.INSTANCE;
- return defaultHandler;
- }
-
- /**
- * @param handler
- */
- public static void setDefaultHandler(RendererFactoryDefaultHandler handler) {
- defaultHandler = handler;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RendererFactoryDefaultHandler.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RendererFactoryDefaultHandler.java
deleted file mode 100644
index 575df4fe2..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RendererFactoryDefaultHandler.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Dec 1, 2003
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-/**
- * @author schacher
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public interface RendererFactoryDefaultHandler {
-
- RendererFactory getDefaultRendererFactory();
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RootTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RootTranslator.java
deleted file mode 100644
index 18f8d84d6..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RootTranslator.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.resource.Resource;
-
-public class RootTranslator extends Translator {
-
- /**
- * Constructor for RootTranslator.
- *
- * @param domNameAndPath
- * @param eClass
- */
- public RootTranslator(String domNameAndPath, EClass eClass) {
- super(domNameAndPath, eClass);
- }
-
- /**
- * @see com.ibm.etools.emf2xml.impl.Translator#setMOFValue(Notifier, Object, int)
- */
- public void setMOFValue(Notifier owner, Object value, int newIndex) {
- ((Resource) owner).getContents().add(newIndex, value);
- }
-
- /**
- * @see com.ibm.etools.emf2xml.impl.Translator#removeMOFValue(Notifier, Object)
- */
- public void removeMOFValue(Notifier owner, Object value) {
- ((Resource) owner).getContents().remove(value);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#setMOFValue(org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- public void setMOFValue(Resource res, Object value) {
- if (res != null && value != null)
- res.getContents().add(value);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#isMultiValued()
- */
- public boolean isMultiValued() {
- return true;
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/SourceLinkTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/SourceLinkTranslator.java
deleted file mode 100644
index d5d697bb7..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/SourceLinkTranslator.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 1, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * @author schacher
- */
-public class SourceLinkTranslator extends Translator {
-
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param path
- */
- public SourceLinkTranslator(String domNameAndPath, EStructuralFeature aFeature, TranslatorPath path) {
- super(domNameAndPath, aFeature, path);
- }
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param path
- */
- public SourceLinkTranslator(String domNameAndPath, EStructuralFeature aFeature, TranslatorPath path, int style) {
- super(domNameAndPath, aFeature, path);
- fStyle |= style;
- }
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param style
- */
- public SourceLinkTranslator(String domNameAndPath, EStructuralFeature aFeature, int style) {
- super(domNameAndPath, aFeature, style);
- }
-
- public Object convertStringToValue(String strValue, EObject owner) {
-
- Object value = null;
- if (strValue != null)
- // Find the object with the name that matches matchName
- value = fTranslatorPaths[0].findObject(owner, strValue.trim());
- if ((fStyle & Translator.STRING_RESULT_OK) != 0)
- return ((value != null) ? value : strValue);
- return value;
- }
-
- public String convertValueToString(Object value, EObject owner) {
- TranslatorPath path = fTranslatorPaths[0];
- Object attrValue = path.getLastMap().getMOFValue((EObject) value);
- return path.getLastMap().convertValueToString(attrValue, owner);
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Translator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Translator.java
deleted file mode 100644
index d36e3cff0..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Translator.java
+++ /dev/null
@@ -1,792 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EStructuralFeatureImpl;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
-import org.eclipse.wst.common.internal.emf.utilities.FeatureValueConverter;
-
-
-public class Translator {
-
- public final static int NO_STYLE = 0;
- public final static int DOM_ATTRIBUTE = 1;
- public final static int EMPTY_TAG = 1 << 1;
- public final static int CDATA_CONTENT = 1 << 2;
- /**
- * Style bit that indicates that the end tag should NOT be indented; by default it is.
- */
- public final static int END_TAG_NO_INDENT = 1 << 3;
- /**
- * Style bit that indicates that booleans should NOT be converted as "True" and "False"; default
- * is that they are
- */
- public final static int BOOLEAN_LOWERCASE = 1 << 4;
- /**
- * Style bit that indicates an enum value contains hyphens If this is true, then internally the
- * hyphens are replaced with underscores
- */
- public final static int ENUM_FEATURE_WITH_HYPHENS = 1 << 5;
-
- protected final static int OBJECT_MAP = 1 << 6;
- protected final static int BOOLEAN_FEATURE = 1 << 7;
-
- protected final static int SHARED_REFERENCE = 1 << 8;
-
- /**
- * Indicates that the feature may be significant even if it is empty
- */
- public final static int EMPTY_CONTENT_IS_SIGNIFICANT = 1 << 9;
-
- /**
- * Used to indicate that feature is associated with a comment node
- */
- protected final static int COMMENT_FEATURE = 1 << 10;
-
- /**
- * If the value is null, then an eUnset() will be invoked on the feature
- */
- public final static int UNSET_IF_NULL = 1 << 11;
-
- /**
- * Return the element contents as a String if the feature is unresolveable (Used by the
- * SourceLinkTranslator)
- */
- public final static int STRING_RESULT_OK = 1 << 12;
-
- protected String[] fDOMNames;
- protected String fDOMPath = ""; //$NON-NLS-1$
- protected Map readAheadNames;
- protected int fStyle = NO_STYLE;
- protected EStructuralFeature feature;
- protected TranslatorPath[] fTranslatorPaths;
- protected EClass emfClass;
- protected String fNameSpace = ""; //$NON-NLS-1$
- // added by MDE
- protected String domNameAndPath = null;
-
- /**
- * Indicates if any of the children of this Translator are themselves DependencyTranslators
- */
- protected Boolean isDependencyParent;
- protected EStructuralFeature dependencyFeature;
- protected static EcorePackage ECORE_PACKAGE = EcorePackage.eINSTANCE;
-
- // Use this identifier for the DOMName when the attribute
- // value is to be extracted directly from the text of the node.
- // This is rare, but occurs in the web.xml in the case of a
- // WelcomeFile.
- static final public String TEXT_ATTRIBUTE_VALUE = "$TEXT_ATTRIBUTE_VALUE"; //$NON-NLS-1$
-
- static final public EStructuralFeature CONTAINER_FEATURE = new ContainerFeature();
-
- static final public EStructuralFeature ROOT_FEATURE = new RootFeature();
-
- protected static class ContainerFeature extends EStructuralFeatureImpl {
- protected ContainerFeature() {
- super();
- }
- }
-
- protected static class RootFeature extends EStructuralFeatureImpl {
- protected RootFeature() {
- super();
- }
- }
-
- public Translator findChild(String tagName, Object target, int versionID) {
-
- Translator result = null;
- Translator[] maps = getChildren(target, versionID);
-
- if (maps != null) {
- for (int i = 0; i < maps.length; i++) {
- Translator map = maps[i];
- if (map.isMapFor(tagName)) {
- result = map;
- break;
- }
- }
- }
- if (result == null) {
- VariableTranslatorFactory factory = getVariableTranslatorFactory();
- if (factory != null && factory.accepts(tagName)) {
- result = factory.create(tagName);
- }
- }
- return result;
- }
-
- /**
- * Utility method to string together arrays of children
- */
- public static Object[] concat(Object[] array1, Object[] array2) {
- Object[] result = (Object[]) java.lang.reflect.Array.newInstance(array1.getClass().getComponentType(), array1.length + array2.length);
- System.arraycopy(array1, 0, result, 0, array1.length);
- System.arraycopy(array2, 0, result, array1.length, array2.length);
- return result;
- }
-
- public static Object[] concat(Object[] array1, Object object2) {
- Object[] newArray = new Object[]{object2};
- return concat(array1, newArray);
- }
-
- public static Translator createParentAndTextAttributeTranslator(String domName, EStructuralFeature parentFeature, EStructuralFeature childFeature) {
- GenericTranslator parent = new GenericTranslator(domName, parentFeature, END_TAG_NO_INDENT);
- parent.setChildren(new Translator[]{new Translator(TEXT_ATTRIBUTE_VALUE, childFeature)});
- return parent;
- }
-
- public Translator(String domNameAndPath, EClass eClass) {
- initializeDOMNameAndPath(domNameAndPath);
- setEMFClass(eClass);
- }
-
- public Translator(String domNameAndPath, EStructuralFeature aFeature) {
- initializeDOMNameAndPath(domNameAndPath);
- setFeature(aFeature);
- }
-
- public Translator(String domNameAndPath, EStructuralFeature aFeature, EClass eClass) {
- this(domNameAndPath, aFeature);
- setEMFClass(emfClass);
- }
-
- public Translator(String domNameAndPath, EStructuralFeature aFeature, TranslatorPath path) {
- this(domNameAndPath, aFeature, new TranslatorPath[]{path});
- }
-
- public Translator(String domNameAndPath, EStructuralFeature aFeature, TranslatorPath[] paths) {
- initializeDOMNameAndPath(domNameAndPath);
- fTranslatorPaths = paths;
- setFeature(aFeature);
- }
-
- public Translator(String domNameAndPath, EStructuralFeature aFeature, int style) {
- initializeDOMNameAndPath(domNameAndPath);
- fStyle = style;
- setFeature(aFeature);
- }
-
- public static EcorePackage getEcorePackage() {
- return EcorePackage.eINSTANCE;
- }
-
- public String getDOMName(Object value) {
- return fDOMNames[0];
- }
-
- public String[] getDOMNames() {
- return fDOMNames;
- }
-
- public String getDOMPath() {
- return fDOMPath;
- }
-
- public boolean hasDOMPath() {
- return fDOMPath != null && fDOMPath.length() != 0;
- }
-
- public EStructuralFeature getFeature() {
- return feature;
- }
-
- /**
- * Parse the DOM names and path out of <domNameAndPath>and set the appropriate fields.
- */
- protected void initializeDOMNameAndPath(String domNameAndPathArg) {
- if (domNameAndPathArg == null)
- return;
- int inx = domNameAndPathArg.lastIndexOf('/');
- if (inx != -1) {
- fDOMNames = parseDOMNames(domNameAndPathArg.substring(inx + 1));
- fDOMPath = domNameAndPathArg.substring(0, inx);
- } else {
- fDOMNames = parseDOMNames(domNameAndPathArg);
- fDOMPath = ""; //$NON-NLS-1$
- }
- // added by MDE
- this.domNameAndPath = domNameAndPathArg;
-
- }
-
- /**
- * Indicates whether the node should be written as an empty tag; eg, <distributable/>
- */
- public boolean isCDATAContent() {
- return (fStyle & CDATA_CONTENT) != 0;
- }
-
- /**
- * Indicates whether the DOMName represents a sub element name or an attribute name
- *
- * @return boolean True if the DOMName is an attribute name.
- */
- public boolean isDOMAttribute() {
- return (fStyle & DOM_ATTRIBUTE) != 0;
- }
-
- /**
- * Indicates whether the node should be written as an empty tag; eg, <distributable/>
- */
- public boolean isEmptyTag() {
- return (fStyle & EMPTY_TAG) != 0;
- }
-
- public boolean isBooleanUppercase() {
- return (fStyle & BOOLEAN_FEATURE) != 0 && (fStyle & BOOLEAN_LOWERCASE) == 0;
- }
-
- public boolean isBooleanFeature() {
- return (fStyle & BOOLEAN_FEATURE) != 0;
- }
-
- public boolean shouldIndentEndTag() {
- return (fStyle & END_TAG_NO_INDENT) == 0;
- }
-
- public boolean isEmptyContentSignificant() {
- return ((fStyle & EMPTY_TAG) != 0) || ((fStyle & EMPTY_CONTENT_IS_SIGNIFICANT) != 0);
- }
-
- /**
- * Returns true if this map is to another MOF object (not a primitive)
- */
- public boolean isObjectMap() {
- return (fStyle & OBJECT_MAP) != 0;
- }
-
- /**
- * Returns true if this map is for a shared reference
- */
- public boolean isShared() {
- return (fStyle & SHARED_REFERENCE) != 0;
- }
-
- public boolean isEnumWithHyphens() {
- return (fStyle & ENUM_FEATURE_WITH_HYPHENS) != 0;
- }
-
- /**
- * Indicates whether the map represents a case where the text of the DOMNode represents the
- * objects one and only attribute value. An example of this case is a <welcome-file>file.txt
- * </welcome-file>.
- */
- public boolean isDOMTextValue() {
- return fDOMNames[0] == TEXT_ATTRIBUTE_VALUE;
- }
-
- /**
- * Indicates whether the id is the mof attribute that should be set.
- */
- public boolean isIDMap() {
- return false;
- }
-
- /**
- * Indicates whether the id is the mof attribute that should be set.
- */
- public boolean isLinkMap() {
- return fTranslatorPaths != null;
- }
-
- public boolean isTargetLinkMap() {
- return isLinkMap() && !isObjectMap();
- }
-
- /**
- * Return true if this map is the one representing a node with the name <domName>. By default
- * this method simply compares the DOM name of the map against the <domName>parameter
- *
- * @return boolean
- * @param domName
- * java.lang.String
- */
- public boolean isMapFor(String domName) {
- if (domName.equals(getDOMPath()))
- return true;
- for (int i = 0; i < fDOMNames.length; i++) {
- if (domName.equals(fDOMNames[i]))
- return true;
- }
- return false;
- }
-
- public boolean isMapFor(Object aFeature, Object oldValue, Object newValue) {
- return feature == aFeature;
- }
-
- /**
- * Indicates whether feature being mapped is a collection.
- *
- * @return boolean True if the feature is multi valued.
- */
- public boolean isMultiValued() {
- if (feature != null)
- return feature.isMany();
- return false;
- }
-
- /**
- * Parses comma separated names from <domNamesString>. Returns an array containing the names.
- *
- * @return java.lang.String[]
- * @param domNamesString
- * java.lang.String
- */
- protected String[] parseDOMNames(String domNamesString) {
- int startInx = 0;
- int inx = domNamesString.indexOf(',');
- ArrayList results = new ArrayList(1);
- while (inx != -1) {
- results.add(domNamesString.substring(startInx, inx));
- startInx = inx + 1;
- inx = domNamesString.indexOf(',', startInx);
- }
- if (startInx == 0)
- results.add(domNamesString);
- else
- results.add(domNamesString.substring(startInx));
- return (String[]) results.toArray(new String[results.size()]);
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- String cn = getClass().getName();
- int i = cn.lastIndexOf('.');
- cn = cn.substring(++i, cn.length());
- sb.append(cn);
- sb.append('(');
- sb.append(fDOMNames[0]);
- for (int j = 1; j < fDOMNames.length; j++) {
- sb.append('|');
- sb.append(fDOMNames[j]);
- }
- sb.append(',');
- sb.append(hashCode());
- sb.append(')');
- return sb.toString();
- }
-
- /**
- * Gets the TranslatorPath.
- *
- * @return Returns a TranslatorPath
- */
- public TranslatorPath[] getTranslatorPaths() {
- return fTranslatorPaths;
- }
-
- /*
- * @see Object#equals(Object)
- */
- public boolean equals(Object object) {
- if (!(object instanceof Translator))
- return false;
- Translator mapInfo = (Translator) object;
- return fDOMNames.equals(mapInfo.getDOMNames()) && (feature == null && mapInfo.getFeature() == null || feature.equals(mapInfo.getFeature()));
- }
-
- /**
- * Returns the isManagedByParent.
- *
- * @return boolean
- */
- public boolean isManagedByParent() {
- return getChildren(null, -1) == null;
- }
-
- /*
- * In the 99% case there is only one node name to be concerned with, but subclasses can override
- * for the cases where multiple dom names map to one feature
- */
- public EObject createEMFObject(String nodeName, String readAheadName) {
- if (emfClass == null) {
- if (feature == null)
- return null;
- if (isObjectMap())
- return createEMFObject(feature);
- }
- return createEMFObject(emfClass);
- }
-
- public static EObject createEMFObject(EStructuralFeature aFeature) {
- if (aFeature == null)
- return null;
-
- return createEMFObject(((EReference) aFeature).getEReferenceType());
- }
-
- public static EObject createEMFObject(EClass anEClass) {
- if (anEClass == null)
- return null;
- return anEClass.getEPackage().getEFactoryInstance().create(anEClass);
- }
-
- public void setTextValueIfNecessary(String textValue, Notifier owner, int versionId) {
- Translator textTranslator = this.findChild(Translator.TEXT_ATTRIBUTE_VALUE, owner, versionId);
- if (textTranslator != null) {
- Object objectValue = textTranslator.convertStringToValue(textValue, (EObject) owner);
- textTranslator.setMOFValue(owner, objectValue);
- }
- }
-
- /**
- * Check to see if feature is valid on a particular mofObject.
- *
- * @return boolean Return true if the feature specified exists on the MOF object.
- * @param emfObject
- * org.eclipse.emf.ecore.EObject
- */
- public boolean featureExists(EObject emfObject) {
- if (feature == null)
- return false;
-
- return emfObject.eClass().getEStructuralFeature(feature.getName()) != null;
- }
-
- /**
- * Translators which do not have a feature should override this method with custom behavior.
- */
- public String extractStringValue(EObject emfObject) {
- if (isEmptyTag() && feature == null)
- return ""; //Fake it out with a value //$NON-NLS-1$
- return null;
- }
-
- public Object convertStringToValue(String nodeName, String readAheadName, String value, Notifier owner) {
- Object result = null;
- try {
-
- if (!this.isManagedByParent()) {
- result = createEMFObject(nodeName, readAheadName);
- } else {
- result = convertStringToValue(value, (EObject) owner);
- }
-
- } catch (ClassCastException cce) {
-
- }
- return result;
- }
-
- /**
- * Converts a string value to the appropriate type.
- *
- * @return java.lang.Object The converted value
- * @param strValue
- * java.lang.String The string to convert.
- */
- public Object convertStringToValue(String strValue, EObject owner) {
- if (feature == null)
- return strValue;
- if (strValue != null) {
- if (isEnumWithHyphens())
- strValue = strValue.replace('-', '_');
- if (!isCDATAContent()) {
- strValue = strValue.trim();
- }
- }
- Object value = FeatureValueConverter.DEFAULT.convertValue(strValue, feature);
- if (value == null) {
- if (isEmptyTag() && !isDOMAttribute() && !isDOMTextValue() && isBooleanFeature())
- return Boolean.TRUE;
- EObject convertToType = feature.getEType();
- if (convertToType == null)
- value = strValue;
- else if (convertToType.equals(getEcorePackage().getEString())) {
- value = ""; //$NON-NLS-1$
- }
- }
- return value;
- }
-
- /**
- * Converts a value of a specified type to a string value. Subclasses may override for special
- * cases where special conversion needs to occur based on the feature and or object type.
- *
- * @return String The converted value
- * @param value
- * java.lang.Object The object to convert.
- */
- public String convertValueToString(Object value, EObject owner) {
- if (isEmptyTag() || value == null)
- return null;
- else if (isEnumWithHyphens())
- return value.toString().replace('_', '-');
- else if (isBooleanUppercase())
- return ((Boolean) value).booleanValue() ? "True" : "False"; //$NON-NLS-1$ //$NON-NLS-2$
-
- return value.toString();
- }
-
- public Translator[] getVariableChildren(Notifier target, int version) {
- Translator[] results = null;
- VariableTranslatorFactory factory = getVariableTranslatorFactory();
- if (factory != null) {
- List variableTranslators = factory.create(target);
- if (variableTranslators != null && variableTranslators.size() > 0) {
- Object[] vtoa = variableTranslators.toArray();
-
- results = new Translator[vtoa.length];
- for (int i = 0; i < results.length; i++)
- results[i] = (Translator) vtoa[i];
- }
-
- }
- if (results == null)
- results = new Translator[0];
- return results;
- }
-
- /**
- * Returns null by default; subclasses should override to return specific children
- */
- public Translator[] getChildren(Object target, int versionID) {
- return getChildren();
- }
-
- protected Translator[] getChildren() {
- return null;
- }
-
- /**
- * Return the list of MOF children that currently exist for the values of an attribute.
- */
- public List getMOFChildren(EObject mofObject) {
- if (feature == null)
- return Collections.EMPTY_LIST;
- Object value = getMOFValue(mofObject);
- List result = Collections.EMPTY_LIST;
- if (isMultiValued())
- result = (List) value;
- else if (value != null)
- result = Collections.singletonList(value);
- return result;
- }
-
- public Object getMOFValue(EObject mofObject) {
- if (feature == null)
- return null;
- return mofObject.eGet(feature);
- }
-
- /**
- * Sets a value of a feature in a mof object.
- */
- public void setMOFValue(Notifier owner, Object value, int newIndex) {
- if (feature != null) {
- if ((fStyle & UNSET_IF_NULL) != 0 && value == null)
- ExtendedEcoreUtil.eUnsetOrRemove((EObject) owner, feature, value);
- else
- ExtendedEcoreUtil.eSetOrAdd((EObject) owner, feature, value, newIndex);
- }
- }
-
- public void setMOFValue(Notifier owner, Object value) {
- if (owner instanceof EObject) {
- setMOFValue((EObject) owner, value);
- } else if (owner instanceof Resource) {
- setMOFValue((Resource) owner, value);
- }
- }
-
- public void setMOFValue(EObject emfObject, Object value) {
- // if (feature != null)
- // emfObject.eSet(feature, value);
- setMOFValue(emfObject, value, -1);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#setMOFValue(org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- public void setMOFValue(Resource res, Object value) {
- if (res != null && value != null)
- res.getContents().add(value);
- }
-
- public void removeMOFValue(Notifier owner, Object value) {
- if (feature != null)
- ExtendedEcoreUtil.eUnsetOrRemove((EObject) owner, feature, value);
- }
-
- public boolean isSetMOFValue(EObject emfObject) {
- boolean isSet = feature != null && emfObject.eIsSet(feature);
- if (isEmptyTag())
- return isSet && ((Boolean) emfObject.eGet(feature)).booleanValue();
- return isSet;
- }
-
- public void unSetMOFValue(EObject emfObject) {
- if (feature != null)
- emfObject.eUnset(feature);
- }
-
- public void clearList(EObject mofObject) {
- if (feature != null)
- ((List) mofObject.eGet(feature)).clear();
- }
-
- protected void setFeature(EStructuralFeature aFeature) {
- this.feature = aFeature;
- if (feature == null)
- return;
- //This way an instance check happens only once
- if (aFeature instanceof EReference) {
- fStyle |= OBJECT_MAP;
- if (!((EReference) aFeature).isContainment())
- fStyle |= SHARED_REFERENCE;
- }
-
- if (getEcorePackage().getEBoolean() == feature.getEType())
- fStyle |= BOOLEAN_FEATURE;
- }
-
- protected void setEMFClass(EClass anEClass) {
- this.emfClass = anEClass;
- if (anEClass != null)
- fStyle |= OBJECT_MAP;
-
- }
-
- public boolean hasReadAheadNames() {
- return readAheadNames != null && !readAheadNames.isEmpty();
- }
-
- /**
- * Return the read ahead names, if they are defined, for a given parent node name. This is used
- * when creation of a specific EMF object is dependent on the value of a child node.
- */
- public ReadAheadHelper getReadAheadHelper(String parentName) {
- if (readAheadNames == null)
- return null;
- return (ReadAheadHelper) readAheadNames.get(parentName);
- }
-
- public void addReadAheadHelper(ReadAheadHelper helper) {
- if (readAheadNames == null)
- readAheadNames = new HashMap(3);
- readAheadNames.put(helper.getParentDOMName(), helper);
- }
-
- public boolean isDependencyChild() {
- return false;
- }
-
- /**
- * @return
- */
- public boolean isDependencyParent() {
- if (isDependencyParent == null) {
- isDependencyParent = Boolean.FALSE;
- Translator[] theChildren = getChildren(null, -1);
- if (theChildren != null) {
- for (int i = 0; i < theChildren.length; i++) {
- //For now we assume one
- if (theChildren[i].isDependencyChild()) {
- isDependencyParent = Boolean.TRUE;
- dependencyFeature = theChildren[i].getDependencyFeature();
- }
- }
- }
- }
- return isDependencyParent.booleanValue();
- }
-
- /**
- * @return
- */
- public EStructuralFeature getDependencyFeature() {
- return dependencyFeature;
- }
-
- public EObject basicGetDependencyObject(EObject parent) {
- return (EObject) parent.eGet(dependencyFeature);
- }
-
- /**
- * Use when the DOM path is not null, and there are no children. Default is false, but
- * subclasses may wish to override
- */
- public boolean shouldRenderEmptyDOMPath(EObject eObject) {
- return isEmptyContentSignificant();
- }
-
- /**
- * Use when the translator tolerates parent nodes that relate to the DOM path, and no children;
- * default is do nothing
- */
- public void setMOFValueFromEmptyDOMPath(EObject eObject) {
-
- }
-
- /**
- * Namespace for the attributes
- *
- * @return
- */
- public String getNameSpace() {
- return fNameSpace;
- }
-
- /**
- * Set the namespace for the dom attribute
- *
- * @param string
- */
- public void setNameSpace(String string) {
- fNameSpace = string;
- }
-
- public VariableTranslatorFactory getVariableTranslatorFactory() {
- if (isObjectMap())
- return DefaultTranslatorFactory.INSTANCE;
- return null;
- }
-
- public boolean isEnumFeature() {
- return feature != null && ECORE_PACKAGE.getEEnum().isInstance(feature.getEType());
- }
-
- public boolean isUnsettable() {
- return feature != null && feature.isUnsettable();
- }
-
- public boolean isDataType() {
- return feature != null && feature.getEType() instanceof EDataType;
- }
-
- /**
- * @return
- */
- public boolean isComment() {
- return (fStyle & COMMENT_FEATURE) != 0;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorFilter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorFilter.java
deleted file mode 100644
index b12067d1b..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorFilter.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-/*
- * Created on Sep 21, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EObject;
-
-
-/*
- * Translator filters can be used to differentiate between Object and Attribute Translators without
- * breaking them out into seperate data structures. The Filter will rely on the underlying data
- * structure used to store the children of the given Translator.
- *
- * getNextChild() will return null when no other translators of the given genre are available.
- *
- * The processing hints which are created and then passed to getNext*Translator() store information
- * that needs to be persisted between calls. The createProcessingHints() will create a properly
- * initialized array. The constants NEXT_START_HINT_INDX and MODE_HINT_INDX provide pointers into
- * the array for the NEXT_START position and the proper mode to operate in
- * (STANDARD_TRANSLATORS_MODE or
- *
- */
-public abstract class TranslatorFilter {
-
- protected final Translator translator;
- protected final int version;
-
- public static final int NEXT_START_HINT_INDX = 0;
- public static final int MODE_HINT_INDX = 1;
-
- public static final int STANDARD_TRANSLATORS_MODE = 0;
- public static final int VARIABLE_TRANSLATORS_MODE = 1;
-
- /*
- * These TranslatorFilters are used in a stateless mode. Only their scanNextTranslator() methods
- * will be invoked
- */
- private static final TranslatorFilter objectTranslatorFilter = new ObjectTranslatorFilter(null, -1);
- private static final TranslatorFilter attributeTranslatorFilter = new AttributeTranslatorFilter(null, -1);
-
-
- protected int mode = STANDARD_TRANSLATORS_MODE;
- protected int index = -1;
-
- protected Translator cachedPeekAheadTranslator = null;
-
- public TranslatorFilter(Translator trans, int version) {
- this.translator = trans;
- this.version = version;
- }
-
- /**
- * Calling peek twice will advance the current child
- */
- public Translator peekNextChild(EObject target) {
- cachedPeekAheadTranslator = getNextChild(target);
- return cachedPeekAheadTranslator;
- }
-
- /**
- * getNextChild() will return null when no other translators of the given genre are available.
- */
- public Translator getNextChild(EObject target) {
-
- Translator result = null;
- if (cachedPeekAheadTranslator != null) {
- result = cachedPeekAheadTranslator;
- cachedPeekAheadTranslator = null;
- return result;
- }
-
- int found = 0;
- Translator children[] = null;
- switch (mode) {
- case STANDARD_TRANSLATORS_MODE :
- children = this.translator.getChildren(target, this.version);
-
- /* Look for the next Attribute Translator */
- found = scanNextTranslator(children, this.index);
-
- if (found >= 0) {
- /*
- * If found, (1) update the result, (2) update the index so we can skip ahead on
- * the next invocation (3) escape the VARIABLE_TRANSLATORS processing
- */
- result = children[found];
- this.index = found;
- break;
- }
- /*
- * Reset the index. DO NOT BREAK. Allow entry into VARIABLE_TRANSLATORS case
- */
- this.index = -1;
- /*
- * update the mode to VARIABLE_TRANSLATORS so we can skip to it directly next time
- */
- this.mode = VARIABLE_TRANSLATORS_MODE;
- case VARIABLE_TRANSLATORS_MODE :
- children = this.translator.getVariableChildren(target, this.version);
- found = scanNextTranslator(children, this.index);
- if (found >= 0) {
- /*
- * If found, (1) update the result, (2) update the index so we can skip ahead on
- * the next invocation
- */
- result = children[found];
- this.index = found;
- }
-
- }
-
- return result;
- }
-
- public static final int[] createProcessingHints() {
- return new int[]{-1, STANDARD_TRANSLATORS_MODE};
- }
-
- public static final Translator getNextAttributeTranslator(Translator translator, int startHint, int[] nextHint, EObject target, int version) {
-
- return TranslatorFilter.getNextChild(translator, startHint, nextHint, target, version, attributeTranslatorFilter);
- }
-
- public static final Translator getNextObjectTranslator(Translator translator, int startHint, int[] nextHint, EObject target, int version) {
-
- return TranslatorFilter.getNextChild(translator, startHint, nextHint, target, version, objectTranslatorFilter);
- }
-
- /**
- * getNextChild() takes hints on where to begin in the children array of the given Translator.
- * When it finds the translator, it will update the hints array with the start hint for the next
- * invocation(hints[0]) and when necessary it will use update the mode (hints[1]) to either
- * STANDARD_TRANSLATORS or VARIABLE_TRANSLATORS.
- *
- * @param translator
- * @param startHint
- * @param hints
- * a two-element array: hints[0] will be updated with the next startHint and hints[1]
- * will be used to store the mode.
- * @param target
- * @param version
- * @param translatorFilter
- * @return
- */
- public static final Translator getNextChild(Translator translator, int startHint, int[] hints, EObject target, int version, TranslatorFilter translatorFilter) {
-
- Translator result = null;
-
- int index = startHint;
- Translator children[] = null;
-
- switch (hints[MODE_HINT_INDX]) {
- case STANDARD_TRANSLATORS_MODE :
- children = translator.getChildren(target, version);
- if (children != null && startHint < children.length) {
-
- /* Look for the next Attribute Translator */
- index = translatorFilter.scanNextTranslator(children, index);
-
- if (index >= 0) {
- /*
- * If found, (1) update the result, (2) update the index so we can skip
- * ahead on the next invocation (3) escape the VARIABLE_TRANSLATORS
- * processing
- */
- result = children[index];
- break;
- }
- /*
- * DO NOT BREAK we will default to VARIABLE TRANSLATORS MODE so we must reset
- * the startHint appropriately
- */
- startHint = -1;
- }
-
- case VARIABLE_TRANSLATORS_MODE :
- hints[MODE_HINT_INDX] = VARIABLE_TRANSLATORS_MODE;
- /*
- * Reset the index.
- */
- index = startHint;
- children = translator.getVariableChildren(target, version);
- if (children != null && children.length > 0 && startHint < children.length) {
- index = translatorFilter.scanNextTranslator(children, index);
- result = (index >= 0) ? children[index] : null;
- }
- }
-
- hints[NEXT_START_HINT_INDX] = (result == null && children != null) ? children.length : index;
-
- return result;
- }
-
-
- public abstract int scanNextTranslator(Translator[] children, int start);
-
- /**
- * @return
- */
- public int getIndex() {
- return index;
- }
-
- /**
- * @return
- */
- public int getMode() {
- return mode;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorPath.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorPath.java
deleted file mode 100644
index a2d843e17..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorPath.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-
-public class TranslatorPath {
- protected Translator[] mapInfoPath;
-
- /**
- * Construct with an array of Translator that specifies the path to follow from an object to
- * another object
- */
- public TranslatorPath(Translator[] path) {
- mapInfoPath = path;
- }
-
- public List findObjects(EObject startObject) {
- Object cur = startObject;
- for (int i = 0; i < mapInfoPath.length; i++) {
- Translator curMap = mapInfoPath[i];
- if (cur instanceof EObject) {
- EStructuralFeature curAttr = curMap.getFeature();
- if (curAttr == Translator.CONTAINER_FEATURE) {
- curAttr = ((EObject) cur).eContainmentFeature();
- cur = ((EObject) cur).eContainer();
- } else if (curAttr == Translator.ROOT_FEATURE) {
- cur = ((TranslatorResource) startObject.eResource()).getRootObject();
- } else {
- cur = ((EObject) cur).eGet(curAttr);
- }
- if (curMap.isMultiValued()) {
- return (List) cur;
- }
- }
- }
- return null;
- }
-
- public Object findObject(EObject startObject, Object matchValue) {
- List objects = findObjects(startObject);
- if (objects == null)
- return null;
- return findObject(objects, getLastMap(), matchValue);
- }
-
- private Object findObject(List objectList, Translator map, Object matchValue) {
- for (Iterator iter = objectList.iterator(); iter.hasNext();) {
- EObject mofObject = (EObject) iter.next();
- Object curMatchValue = mofObject.eGet(map.getFeature());
- if (matchValue.equals(curMatchValue))
- return mofObject;
- }
- return null;
- }
-
- public Translator getLastMap() {
- return mapInfoPath[mapInfoPath.length - 1];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer sb = new StringBuffer();
- String cn = getClass().getName();
- int i = cn.lastIndexOf('.');
- cn = cn.substring(++i, cn.length());
- sb.append(cn);
- sb.append('(');
- sb.append(mapInfoPath[0]);
- for (int j = 1; j < mapInfoPath.length; j++) {
- sb.append('\n');
- sb.append(mapInfoPath[j]);
- }
- sb.append(')');
- return sb.toString();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResource.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResource.java
deleted file mode 100644
index 32c9c47fd..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResource.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.EStructuralFeatureImpl;
-import org.xml.sax.EntityResolver;
-
-public interface TranslatorResource extends ReferencedResource {
- /*
- * must make a subclass because the constructor for EStructuralFeature is protected
- */
- static class DocTypeFeature extends EStructuralFeatureImpl {
- protected DocTypeFeature() {
- super();
- }
- }
-
-
- EStructuralFeature DOC_TYPE_FEATURE = new DocTypeFeature();
-
- /**
- * The public id of the XML document, if specified.
- */
- String getPublicId();
-
- /**
- * Return the first element in the EList.
- */
- EObject getRootObject();
-
- /**
- * The system id of the XML document, if specified.
- */
- String getSystemId();
-
- /**
- * Sets the public id and system id of the XML document.
- */
- void setDoctypeValues(String publicId, String systemId);
-
- /**
- * Sets the default public/system ids if necessary
- */
- void setDefaults();
-
- /**
- * Returns the name that will be in the document type header of the serialized xml file
- */
- String getDoctype();
-
- /**
- * Returns the XML version of this document
- */
- String getXMLVersion();
-
- Translator getRootTranslator();
-
- /**
- * Entity resolver that can be used when using standard parsers to read the resource
- */
- EntityResolver getEntityResolver();
-
- boolean usesDTD();
-
- public int getVersionID();
-
- void setVersionID(int i);
-
- Renderer getRenderer();
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResourceFactory.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResourceFactory.java
deleted file mode 100644
index 20a450b36..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResourceFactory.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-
-public abstract class TranslatorResourceFactory extends ReferencedXMIFactoryImpl implements RendererFactory.Listener {
-
- protected RendererFactory rendererFactory;
- private boolean listeningForUpdates = false;
-
- /**
- * Constructor for TranslatorResourceFactory.
- */
- public TranslatorResourceFactory(RendererFactory aRendererFactory, boolean listeningForUpdates) {
- super();
- rendererFactory = aRendererFactory;
- setListeningForUpdates(listeningForUpdates);
- }
-
- /**
- * Constructor for TranslatorResourceFactory.
- */
- public TranslatorResourceFactory(RendererFactory aRendererFactory) {
- this(aRendererFactory, true);
- }
-
- public void setListeningForUpdates(boolean shouldBeListeningForUpdates) {
-
- if (this.listeningForUpdates ^ shouldBeListeningForUpdates) {
- if (!shouldBeListeningForUpdates)
- RendererFactory.NotificationEngine.removeListener(this);
- else
- RendererFactory.NotificationEngine.addListener(this);
-
- this.listeningForUpdates = shouldBeListeningForUpdates;
- }
- }
-
- public boolean isListeningForUpdates() {
- return this.listeningForUpdates;
- }
-
- public Resource doCreateResource(URI uri) {
- Renderer aRenderer = rendererFactory.createRenderer();
- return createResource(uri, aRenderer);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.RendererFactory.Listener#updateRendererFactory(com.ibm.etools.emf2xml.RendererFactory)
- */
- public void updateRendererFactory(RendererFactory newRendererFactory) {
- //System.out.println("Updating renderer factory");
- rendererFactory = newRendererFactory;
- }
-
- protected abstract TranslatorResource createResource(URI uri, Renderer aRenderer);
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResourceImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResourceImpl.java
deleted file mode 100644
index c65e5a974..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResourceImpl.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Collection;
-import java.util.Map;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.NotificationImpl;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
-import org.eclipse.wst.common.internal.emf.utilities.StringUtil;
-import org.xml.sax.EntityResolver;
-
-public abstract class TranslatorResourceImpl extends ReferencedXMIResourceImpl implements TranslatorResource {
- static final public EStructuralFeature ID_FEATURE = EcorePackage.eINSTANCE.getEClass_EIDAttribute();
- protected static final String DEFAULT_ENCODING = "UTF-8"; //$NON-NLS-1$
- protected static final String DEFAULT_VERSION = "1.0"; //$NON-NLS-1$
- protected Renderer renderer;
- /**
- * The public Id to use at the head of the document.
- */
- protected String publicId;
- /**
- * The system Id to use at the head of the document.
- */
- protected String systemId;
- protected String xmlVersion;
- // Default the resources to J2EE 1.4
- protected int versionID;
-
- /**
- * @deprecated since 4/29/2003 - used for compatibility Subclasses should
- * be using the Renderers and translator framework
- */
- public TranslatorResourceImpl() {
- super();
- }
-
- /**
- * @deprecated since 4/29/2003 - used for compatibility Subclasses should
- * be using the Renderers and translator framework
- */
- public TranslatorResourceImpl(URI uri) {
- super(uri);
- }
-
- public TranslatorResourceImpl(URI uri, Renderer aRenderer) {
- super(uri);
- setRenderer(aRenderer);
- versionID = getDefaultVersionID();
- }
-
- public TranslatorResourceImpl(Renderer aRenderer) {
- super();
- setRenderer(aRenderer);
- }
-
- public java.lang.String getEncoding() {
- if (super.getEncoding() == null)
- setEncoding(DEFAULT_ENCODING);
- return super.getEncoding();
- }
-
- public String getPublicId() {
- return publicId;
- }
-
- /**
- * Return the first element in the EList.
- */
- public EObject getRootObject() {
- if (contents == null || contents.isEmpty())
- return null;
- return (EObject) getContents().get(0);
- }
-
- public String getSystemId() {
- return systemId;
- }
-
- public void setDoctypeValues(String aPublicId, String aSystemId) {
- boolean changed = !(StringUtil.stringsEqual(publicId, aPublicId) && StringUtil.stringsEqual(systemId, aSystemId));
- publicId = aPublicId;
- systemId = aSystemId;
- if (changed) {
- eNotify(new NotificationImpl(Notification.SET, null, null) {
- public Object getFeature() {
- return DOC_TYPE_FEATURE;
- }
-
- public Object getNotifier() {
- return TranslatorResourceImpl.this;
- }
- });
- }
- }
-
- /**
- * Returns the xmlVersion.
- *
- * @return String
- */
- public String getXMLVersion() {
- if (xmlVersion == null)
- xmlVersion = DEFAULT_VERSION;
- return xmlVersion;
- }
-
- /**
- * Sets the xmlVersion.
- *
- * @param xmlVersion
- * The xmlVersion to set
- */
- public void setXMLVersion(String xmlVersion) {
- this.xmlVersion = xmlVersion;
- }
-
- protected void basicDoLoad(InputStream inputStream, Map options) throws IOException {
- // long start = System.currentTimeMillis();
- boolean isTrackingMods = isTrackingModification();
- try {
- if (isTrackingMods)
- setTrackingModification(false);
- renderer.doLoad(inputStream, options);
- }
- finally {
- if (isTrackingMods)
- setTrackingModification(true);
- }
- // long end = System.currentTimeMillis();
- // recordTime("Load", start, end);
- }
-
- public void save(Map options) throws IOException {
- if (renderer.useStreamsForIO()) {
- super.save(options);
- }
- else {
- // we cast to OutputStream, in preparation for 3.2 code base,
- // where this doSave call is ambiguous with just "null".
- doSave((OutputStream) null, options);
- notifySaved();
- }
- }
-
- /**
- * @see com.ibm.etools.xmi.helpers.CompatibilityXMIResourceImpl#doSave(OutputStream,
- * Map)
- */
- public void doSave(OutputStream outputStream, Map options) throws IOException {
- // long start = System.currentTimeMillis();
- renderer.doSave(outputStream, options);
- setModified(false);
- // long end = System.currentTimeMillis();
- // recordTime("Save", start, end);
- }
-
- // private void recordTime(String type, long start, long end) {
- // System.out.println(renderer.getClass().getName() + "\t" + type + "\t" +
- // (end - start) +
- // "\t\t\tms" + "\t" + (( this.getVersionID()) / 10.0) + "\t" + this);
- // //$NON-NLS-1$
- // //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- // }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#doUnload()
- */
- protected void doUnload() {
- renderer.preUnload();
- super.doUnload();
- }
-
- public String toString() {
- return getClass().getName() + getURI().toString();
- }
-
- /**
- * Returns the renderer.
- *
- * @return Renderer
- */
- public Renderer getRenderer() {
- return renderer;
- }
-
- /**
- * Sets the renderer.
- *
- * @param renderer
- * The renderer to set
- */
- public void setRenderer(Renderer renderer) {
- this.renderer = renderer;
- if (renderer.getResource() != this)
- renderer.setResource(this);
- }
-
- /**
- * For compatibility of old subtype resources, returns the super
- * implementation
- *
- * @return
- */
- protected EList primGetContents() {
- return super.getContents();
- }
-
- public EList getContents() {
- if (contents == null) {
- initializeContents();
- }
- return contents;
- }
-
- protected void initializeContents() {
- contents = new ResourceImpl.ContentsEList() {
- public boolean add(Object object) {
- renderer.prepareToAddContents();
- return super.add(object);
- }
-
- public boolean addAll(Collection collection) {
- renderer.prepareToAddContents();
- return super.addAll(collection);
- }
- };
- }
-
- public void setDefaults() {
- if (systemId != null && publicId != null)
- return;
- String pubId = publicId == null ? getDefaultPublicId() : publicId;
- String sysId = systemId == null ? getDefaultSystemId() : systemId;
- setDoctypeValues(pubId, sysId);
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#init()
- */
- protected void init() {
- super.init();
- setEncoding(DEFAULT_ENCODING);
- }
-
- /**
- * Returns null by default; subclasses can override
- *
- * @see com.ibm.etools.emf2xml.TranslatorResource#createEntityResolver()
- */
- public EntityResolver getEntityResolver() {
- return null;
- }
-
- protected abstract String getDefaultPublicId();
-
- protected abstract String getDefaultSystemId();
-
- protected abstract int getDefaultVersionID();
-
- /**
- * @return
- */
- public int getVersionID() {
- return versionID;
- }
-
- /**
- * @param i
- */
- public void setVersionID(int i) {
- versionID = i;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.TranslatorResource#usesDTD()
- */
- public boolean usesDTD() {
- return getPublicId() != null && getSystemId() != null;
- }
-
- /**
- * Overridden to notify when the ID gets set; need this to push it into
- * the resource
- *
- * @see org.eclipse.emf.ecore.xmi.XMLResource#setID(EObject, String)
- */
- public void setID(EObject eObject, String id) {
- String oldId = getID(eObject);
- super.setID(eObject, id);
- eObject.eNotify(new ENotificationImpl((InternalEObject) eObject, Notification.SET, ID_FEATURE, oldId, id));
- }
-
- /**
- * This method indicates whether or not the extent associated with the
- * resource has been modified since the last time it was loaded or saved.
- *
- * @return boolean
- */
- public boolean isModified() {
- return super.isModified() || renderer.isModified();
- }
-
- /*
- * Overriden to give the renderer a hook
- *
- * @see org.eclipse.wst.common.internal.emf.resource.ReferencedResource#accessForWrite()
- */
- public void accessForWrite() {
- renderer.accessForWrite();
- super.accessForWrite();
- }
-
- /*
- * Overriden to give the renderer a hook
- *
- * @see org.eclipse.wst.common.internal.emf.resource.ReferencedResource#accessForRead()
- */
- public void accessForRead() {
- renderer.accessForRead();
- super.accessForRead();
- }
-
- public void releaseFromRead() {
- renderer.releaseFromRead();
- super.releaseFromRead();
- }
-
- public void releaseFromWrite() {
- renderer.releaseFromWrite();
- super.releaseFromWrite();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf.workbench.ReferencedXMIResourceImpl#preDelete()
- */
- public void preDelete() {
- super.preDelete();
- renderer.preDelete();
- }
-
- public boolean isShared() {
- return super.isShared() || renderer.isShared();
- }
-
- public boolean isSharedForWrite() {
- return super.isSharedForWrite() || renderer.isSharedForWrite();
- }
-
- public boolean isLoaded() {
- synchronized (this) {
- return super.isLoaded();
- }
- }
-
- public void load(Map options) throws IOException {
- synchronized (this) {
- if (isLoaded)
- return;
- // System.out.println(Thread.currentThread() + "
- // TranslatorResource.load(): " + this);
- if (renderer.useStreamsForIO()) {
- super.load(options);
- }
- else if (!isLoaded) {
- load((InputStream) null, options);
- }
- }
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/UnsupportedFeature.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/UnsupportedFeature.java
deleted file mode 100644
index 43c5864ab..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/UnsupportedFeature.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 13, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.EAttributeImpl;
-
-/**
- * @author cbridgha
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Generation - Code and Comments
- */
-public class UnsupportedFeature extends EAttributeImpl {
- /**
- * This is used to capture features that are no longer supported
- */
- public static boolean isUnsupported(EClass anEClass, String featureName) {
-
- if (featureName.equals("isZeroParams") && anEClass.getName().equals("MethodElement")) //$NON-NLS-1$ //$NON-NLS-2$
- return true;
- return false;
- }
-
- public UnsupportedFeature() {
- super();
- // TODO Auto-generated constructor stub
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/VariableTranslatorFactory.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/VariableTranslatorFactory.java
deleted file mode 100644
index 1a4eef991..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/VariableTranslatorFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Aug 20, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-
-
-/**
- * @author schacher
- */
-public interface VariableTranslatorFactory {
- /** Returns whether a Translator should be created for the given DOM name */
- boolean accepts(String domName);
-
- /** Returns whether a Translator should be created for the given feature */
- boolean accepts(Notification notif);
-
- Translator create(Notification notif);
-
- /** Creates a new Translator for the DOM name */
- Translator create(String domName);
-
- /** Creates variable translators for an EMF object to be rendered */
- List create(Notifier target);
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/XMLEncoderDecoder.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/XMLEncoderDecoder.java
deleted file mode 100644
index 9f469622d..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/XMLEncoderDecoder.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on May 20, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-/**
- * @author mdelder
- *
- */
-public class XMLEncoderDecoder {
-
- /**
- *
- */
- public XMLEncoderDecoder() {
- super();
- }
-
- /**
- * Identifies the last printable character in the Unicode range that is supported by the
- * encoding used with this serializer. For 8-bit encodings this will be either 0x7E or 0xFF. For
- * 16-bit encodings this will be 0xFFFF. Characters that are not printable will be escaped using
- * character references.
- */
- private int _lastPrintable = 0x7E;
-
- protected static XMLEncoderDecoder _singleton;
-
-
- /**
- * Returns a decoded version of the value.
- */
- public String decode(String value) {
- // NOT_IMPLEMENTED
- return value;
- }
-
-
- /**
- * Escapes a string so it may be printed as text content or attribute value. Non printable
- * characters are escaped using character references. Where the format specifies a deault entity
- * reference, that reference is used (e.g. <tt>&amp;lt;</tt>).
- *
- * @param source
- * The string to escape
- */
- public char[] encode(char[] value) {
- boolean unmodified = true;
- StringBuffer sbuf = new StringBuffer(value.length);
- String charRef = null;
- char ch;
- for (int i = 0; i < value.length; ++i) {
- ch = value[i];
- // If there is a suitable entity reference for this
- // character, print it. The list of available entity
- // references is almost but not identical between
- // XML and HTML.
- charRef = getEntityRef(ch);
- if (charRef != null) {
- sbuf.append('&');
- sbuf.append(charRef);
- sbuf.append(';');
- unmodified = false;
- } else if ((ch >= ' ' && ch <= _lastPrintable && ch != 0xF7) || ch == '\n' || ch == '\r' || ch == '\t') {
- // If the character is not printable, print as character
- // reference.
- // Non printables are below ASCII space but not tab or line
- // terminator, ASCII delete, or above a certain Unicode
- // threshold.
- sbuf.append(ch);
- } else {
- sbuf.append("&#");//$NON-NLS-1$
- sbuf.append(Integer.toString(ch));
- sbuf.append(';');
- unmodified = false;
- }
- }
- if (unmodified)
- return value;
- char[] result = new char[sbuf.length()];
- sbuf.getChars(0, sbuf.length(), result, 0);
- return result;
- }
-
- /**
- * Escapes a string so it may be printed as text content or attribute value. Non printable
- * characters are escaped using character references. Where the format specifies a deault entity
- * reference, that reference is used (e.g. <tt>&amp;lt;</tt>).
- *
- * @param source
- * The string to escape
- */
- public String encode(String value) {
- StringBuffer sbuf = new StringBuffer(value.length());
- String charRef = null;
- char ch;
- for (int i = 0; i < value.length(); ++i) {
- ch = value.charAt(i);
- // If there is a suitable entity reference for this
- // character, print it. The list of available entity
- // references is almost but not identical between
- // XML and HTML.
- charRef = getEntityRef(ch);
- if (charRef != null) {
- sbuf.append('&');
- sbuf.append(charRef);
- sbuf.append(';');
- } else if ((ch >= ' ' && ch <= _lastPrintable && ch != 0xF7) || ch == '\n' || ch == '\r' || ch == '\t') {
- // If the character is not printable, print as character
- // reference.
- // Non printables are below ASCII space but not tab or line
- // terminator, ASCII delete, or above a certain Unicode
- // threshold.
- sbuf.append(ch);
- } else {
- sbuf.append("&#");//$NON-NLS-1$
- sbuf.append(Integer.toString(ch));
- sbuf.append(';');
- }
- }
- return sbuf.toString();
- }
-
- public static String escape(String value) {
- if (_singleton == null) {
- _singleton = new XMLEncoderDecoder();
- }
- return _singleton.encode(value);
- }
-
- /**
- * Returns the suitable entity reference for this character value, or null if no such entity
- * exists. Calling this method with <tt>'&amp;'</tt> will return <tt>"&amp;amp;"</tt>.
- *
- * @param ch
- * Character value
- * @return Character entity name, or null
- */
- protected String getEntityRef(char ch) {
- // Encode special XML characters into the equivalent character
- // references.
- // These five are defined by default for all XML documents.
- switch (ch) {
- case '<' :
- return "lt";//$NON-NLS-1$
- case '>' :
- return "gt";//$NON-NLS-1$
- case '"' :
- return "quot";//$NON-NLS-1$
- case '\'' :
- return "apos";//$NON-NLS-1$
- case '&' :
- return "amp";//$NON-NLS-1$
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AdapterFactoryDescriptor.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AdapterFactoryDescriptor.java
deleted file mode 100644
index a852031ea..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AdapterFactoryDescriptor.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-
-public interface AdapterFactoryDescriptor {
-
- public AdapterFactory createAdapterFactory();
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AdapterFactoryUtil.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AdapterFactoryUtil.java
deleted file mode 100644
index 706f9eac8..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AdapterFactoryUtil.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notifier;
-
-public class AdapterFactoryUtil {
-
- /**
- * Constructor for AdapterFactoryUtil.
- */
- public AdapterFactoryUtil() {
- super();
- }
-
- public static void adaptNew(Notifier newObject, List factories) {
- AdapterFactory fact;
- for (int i = 0; i < factories.size(); i++) {
- fact = (AdapterFactory) factories.get(i);
- fact.adaptNew(newObject, null);
- }
- }
-
- public static void createAdapterFactories(List descriptors, List factories) {
- AdapterFactoryDescriptor desc;
- AdapterFactory adapterFact;
- for (int i = 0; i < descriptors.size(); i++) {
- desc = (AdapterFactoryDescriptor) descriptors.get(i);
- adapterFact = desc.createAdapterFactory();
- if (adapterFact != null)
- factories.add(adapterFact);
- }
- descriptors.clear();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ArrayUtil.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ArrayUtil.java
deleted file mode 100644
index 847b88d6f..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ArrayUtil.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-
-public class ArrayUtil {
-
- public static Object[] concat(Object[] array1, Object[] array2) {
- Class componentType = null;
- if (array1.getClass().getComponentType() == array2.getClass().getComponentType())
- componentType = array1.getClass().getComponentType();
- else
- componentType = Object.class;
-
- return concat(array1, array2, componentType);
- }
-
- public static Object[] concat(Object[] array1, Object[] array2, Class componentType) {
- Object[] result = (Object[]) java.lang.reflect.Array.newInstance(componentType, array1.length + array2.length);
- System.arraycopy(array1, 0, result, 0, array1.length);
- System.arraycopy(array2, 0, result, array1.length, array2.length);
- return result;
- }
-
- public static Object[] concatAll(java.util.List arrays, Class componentType) {
- int resultLength = 0;
- for (int i = 0; i < arrays.size(); i++) {
- resultLength += ((Object[]) arrays.get(i)).length;
- }
- Object[] result = (Object[]) java.lang.reflect.Array.newInstance(componentType, resultLength);
- int pos = 0;
- for (int i = 0; i < arrays.size(); i++) {
- Object[] array = (Object[]) arrays.get(i);
- System.arraycopy(array, 0, result, pos, array.length);
- pos += array.length;
- }
- return result;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Assert.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Assert.java
deleted file mode 100644
index b37585115..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Assert.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-
-
-
-/**
- * <code>Assert</code> is useful for for embedding runtime sanity checks in code. The predicate
- * methods all test a condition and throw some type of unchecked exception if the condition does not
- * hold.
- * <p>
- * Assertion failure exceptions, like most runtime exceptions, are thrown when something is
- * misbehaving. Assertion failures are invariably unspecified behavior; consequently, clients should
- * never rely on these being thrown (and certainly should not being catching them specifically).
- * </p>
- */
-// This class was, originally, copied directly from com.ibm.itp.common.
-// It was copied to our own package just to minimize minor dependencies
-// on other packages and internal APIs.
-public final class Assert {
- /* This class is not intended to be instantiated. */
-
- private Assert() {
- }
-
- /**
- * Asserts that an argument is legal. If the given boolean is not <code>true</code>, an
- * <code>IllegalArgumentException</code> is thrown.
- *
- * @param expression
- * the outcode of the check
- * @return <code>true</code> if the check passes (does not return if the check fails)
- * @exception IllegalArgumentException
- * if the legality test failed
- */
- public static boolean isLegal(boolean expression) {
- return isLegal(expression, "");//$NON-NLS-1$
- }
-
- /**
- * Asserts that an argument is legal. If the given boolean is not <code>true</code>, an
- * <code>IllegalArgumentException</code> is thrown. The given message is included in that
- * exception, to aid debugging.
- *
- * @param expression
- * the outcode of the check
- * @param message
- * the message to include in the exception
- * @return <code>true</code> if the check passes (does not return if the check fails)
- * @exception IllegalArgumentException
- * if the legality test failed
- */
- public static boolean isLegal(boolean expression, String message) {
- if (!expression)
- throw new IllegalArgumentException();
- return expression;
- }
-
- /**
- * Asserts that the given object is not <code>null</code>. If this is not the case, some kind
- * of unchecked exception is thrown.
- *
- * @param object
- * the value to test
- * @exception IllegalArgumentException
- * if the object is <code>null</code>
- */
- public static void isNotNull(Object object) {
- isNotNull(object, "");//$NON-NLS-1$
- }
-
- /**
- * Asserts that the given object is not <code>null</code>. If this is not the case, some kind
- * of unchecked exception is thrown. The given message is included in that exception, to aid
- * debugging.
- *
- * @param object
- * the value to test
- * @param message
- * the message to include in the exception
- * @exception IllegalArgumentException
- * if the object is <code>null</code>
- */
- public static void isNotNull(Object object, String message) {
- if (object == null) {
- Logger.getLogger().logError("null_argument: " + message);//$NON-NLS-1$
- throw new AssertionFailedException();
- }
- }
-
- /**
- * Asserts that the given boolean is <code>true</code>. If this is not the case, some kind of
- * unchecked exception is thrown.
- *
- * @param expression
- * the outcode of the check
- * @return <code>true</code> if the check passes (does not return if the check fails)
- */
- public static boolean isTrue(boolean expression) {
- return isTrue(expression, "");//$NON-NLS-1$
- }
-
- /**
- * Asserts that the given boolean is <code>true</code>. If this is not the case, some kind of
- * unchecked exception is thrown. The given message is included in that exception, to aid
- * debugging.
- *
- * @param expression
- * the outcode of the check
- * @param message
- * the message to include in the exception
- * @return <code>true</code> if the check passes (does not return if the check fails)
- */
- public static boolean isTrue(boolean expression, String message) {
- if (!expression) {
- Logger.getLogger().logError("assertion failed: " + message);//$NON-NLS-1$
- throw new AssertionFailedException();
- }
- return expression;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AssertionFailedException.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AssertionFailedException.java
deleted file mode 100644
index 044c60db5..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AssertionFailedException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-/**
- * <code>AssertionFailedException</code> is a runtime exception thrown by some of the methods in
- * <code>Assert</code>.
- * <p>
- * This class is not declared public to prevent some misuses; programs that catch or otherwise
- * depend on assertion failures are susceptible to unexpected breakage when assertions in the code
- * are added or removed.
- * </p>
- */
-// This class was, originally, copied directly from com.ibm.itp.common.
-// It was copied to our own package just to minimize minor dependencies
-// on other packages and internal APIs.
-class AssertionFailedException extends RuntimeException {
- /**
- * Constructs a new exception.
- */
- public AssertionFailedException() {
- }
-
- /**
- * Constructs a new exception with the given message.
- */
- public AssertionFailedException(String detail) {
- super(detail);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Association.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Association.java
deleted file mode 100644
index 485d0c3f0..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Association.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-/**
- * Insert the type's description here. Creation date: (12/17/2000 7:38:15 PM)
- *
- * @author: Administrator
- */
-public class Association {
- protected Object key;
- protected Object value;
-
- /**
- * Association constructor comment.
- */
- public Association(Object aKey, Object aValue) {
- setKey(aKey);
- setValue(aValue);
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 7:38:48 PM)
- *
- * @return java.lang.Object
- */
- public java.lang.Object getKey() {
- return key;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 7:38:48 PM)
- *
- * @return java.lang.Object
- */
- public java.lang.Object getValue() {
- return value;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 7:38:48 PM)
- *
- * @param newKey
- * java.lang.Object
- */
- public void setKey(java.lang.Object newKey) {
- key = newKey;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 7:38:48 PM)
- *
- * @param newValue
- * java.lang.Object
- */
- public void setValue(java.lang.Object newValue) {
- value = newValue;
- }
-}
-
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CloneablePublic.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CloneablePublic.java
deleted file mode 100644
index b243775af..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CloneablePublic.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Sep 22, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.utilities;
-
-/**
- * Interface that exposes the clone method, for objects that need to generically copy other
- * cloneable objects
- */
-public interface CloneablePublic extends Cloneable {
- Object clone();
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CommandContext.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CommandContext.java
deleted file mode 100644
index 913139cb1..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CommandContext.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 27, 2004
- */
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-
-
-
-/**
- * @author John Mourra
- */
-public class CommandContext implements ICommandContext {
-
- private IProgressMonitor monitor;
- private Map properties;
- private ResourceSet resourceSet;
-
- /**
- * @param monitor
- */
- public CommandContext(IProgressMonitor monitor) {
- this(monitor, null, null);
- }
-
- /**
- * @param monitor
- * @param configurationProperties
- * @param resourceSet
- */
- public CommandContext(IProgressMonitor monitor, Map configurationProperties, ResourceSet resourceSet) {
- this.monitor = monitor;
- this.properties = configurationProperties;
- this.resourceSet = resourceSet;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.ws.rd.command.framework.ICommandContext#getProgressMonitor()
- */
- public IProgressMonitor getProgressMonitor() {
- if (monitor == null)
- monitor = new NullProgressMonitor();
- return monitor;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.ws.rd.command.framework.ICommandContext#getConfigurationProperties()
- */
- public Map getConfigurationProperties() {
- if (properties == null)
- properties = new HashMap();
- return properties;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.ws.rd.command.framework.ICommandContext#getResourceSet()
- */
- public ResourceSet getResourceSet() {
- if (resourceSet == null)
- resourceSet = new ResourceSetImpl();
- return resourceSet;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CopyGroup.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CopyGroup.java
deleted file mode 100644
index 79b3b1e71..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CopyGroup.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-/**
- * This class is used to copy a group of RefObjects and/or Resources. This group will ensure that
- * all non-composite relationships are deferred until all Resources and RefObjects are copied. This
- * allows you to make copies of a group of objects that may have non-composite relationships and
- * ensure that these relationships are pointing to the copied object if it is part of the group
- * (either directly or through a containment relationship). Creation date: (12/17/2000 1:21:17 PM)
- *
- * @author: Administrator
- */
-public class CopyGroup {
- protected String defaultIdSuffix;
- protected ResourceSet copyContext;
- protected List resources;
- protected List refObjects;
- protected List copiedResources;
- protected List copiedRefObjects;
- protected boolean preserveIds = false;
-
- /**
- * CopyGroup constructor comment.
- */
- public CopyGroup() {
- super();
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:28:16 PM)
- *
- * @param aRefObject
- * org.eclipse.emf.ecore.EObject
- */
- public boolean add(EObject aRefObject) {
- return add(aRefObject, null);
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:28:16 PM)
- *
- * @param aRefObject
- * org.eclipse.emf.ecore.EObject
- */
- public boolean add(EObject aRefObject, String idSuffix) {
- if (aRefObject != null && !containsRefObject(aRefObject)) {
- getRefObjects().add(createAssociation(aRefObject, idSuffix));
- return true;
- }
- return false;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:27:32 PM)
- *
- * @param aResources
- * org.eclipse.emf.ecore.resource.Resource
- */
- public void add(Resource aResource) {
- add(aResource, null);
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:27:32 PM)
- *
- * @param aResources
- * org.eclipse.emf.ecore.resource.Resource
- */
- public void add(Resource aResource, String newUri) {
- if (aResource != null)
- getResources().add(createAssociation(aResource, newUri));
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:28:16 PM)
- *
- * @param aRefObject
- * org.eclipse.emf.ecore.EObject
- */
- public void addCopied(EObject aRefObject) {
- if (aRefObject != null)
- getCopiedRefObjects().add(aRefObject);
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:27:32 PM)
- *
- * @param aResources
- * org.eclipse.emf.ecore.resource.Resource
- */
- public void addCopied(Resource aResource) {
- if (aResource != null) {
- getCopiedResources().add(aResource);
- if (getCopyContext() != null)
- getCopyContext().getResources().add(aResource);
- }
- }
-
- protected boolean contains(List associations, Object anObject) {
- if (anObject == null)
- return false;
- int size = associations.size();
- Association assoc;
- for (int i = 0; i < size; i++) {
- assoc = (Association) associations.get(i);
- if (assoc.getKey() == anObject)
- return true;
- }
- return false;
- }
-
- /**
- * Return true if
- *
- * @aRefObject has been added to this group. Creation date: (12/17/2000 1:28:16 PM)
- * @param aRefObject
- * org.eclipse.emf.ecore.EObject
- */
- public boolean containsRefObject(EObject aRefObject) {
- return contains(getRefObjects(), aRefObject);
- }
-
- /**
- * Return true if
- *
- * @aResource has been added to this group. Creation date: (12/17/2000 1:28:16 PM)
- * @param aRefObject
- * org.eclipse.emf.ecore.EObject
- */
- public boolean containsResource(Resource aResource) {
- return contains(getResources(), aResource);
- }
-
- private Association createAssociation(Object key, Object value) {
- return new Association(key, value);
- }
-
- /**
- * Returns a List of RefObjects that were copied. Creation date: (12/17/2000 1:25:46 PM)
- *
- * @return java.util.List
- */
- public java.util.List getCopiedRefObjects() {
- if (copiedRefObjects == null)
- copiedRefObjects = new ArrayList();
- return copiedRefObjects;
- }
-
- /**
- * Returns a List of Resources that were copied. Creation date: (12/17/2000 1:25:46 PM)
- *
- * @return java.util.List
- */
- public java.util.List getCopiedResources() {
- if (copiedResources == null)
- copiedResources = new ArrayList();
- return copiedResources;
- }
-
- /**
- * The context to add all copied resources into. Creation date: (12/17/2000 8:09:45 PM)
- *
- * @return org.eclipse.emf.ecore.resource.ResourceSet
- */
- public org.eclipse.emf.ecore.resource.ResourceSet getCopyContext() {
- return copyContext;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:44:43 PM)
- *
- * @return java.lang.String
- */
- public java.lang.String getDefaultIdSuffix() {
- return defaultIdSuffix;
- }
-
- /**
- * Should the id be copied in the case where no suffix is specified? Defaults to false
- */
- public boolean getPreserveIds() {
- return preserveIds;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:25:46 PM)
- *
- * @return java.util.List
- */
- public java.util.List getRefObjects() {
- if (refObjects == null)
- refObjects = new ArrayList();
- return refObjects;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:25:46 PM)
- *
- * @return java.util.List
- */
- public java.util.List getResources() {
- if (resources == null)
- resources = new ArrayList();
- return resources;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:25:46 PM)
- *
- * @return java.util.List
- */
- public java.util.List primGetRefObjects() {
- return refObjects;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:25:46 PM)
- *
- * @return java.util.List
- */
- public java.util.List primGetResources() {
- return resources;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:28:16 PM)
- *
- * @param aRefObject
- * org.eclipse.emf.ecore.EObject
- * @return boolean
- */
- public boolean remove(EObject aRefObject) {
- if (aRefObject != null && primGetRefObjects() != null) {
- Iterator it = primGetRefObjects().iterator();
- Association association;
- while (it.hasNext()) {
- association = (Association) it.next();
- if (association.getKey() == aRefObject)
- return primGetRefObjects().remove(association);
- }
- }
- return false;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:27:32 PM)
- *
- * @param aResources
- * org.eclipse.emf.ecore.resource.Resource
- * @return boolean
- */
- public boolean remove(Resource aResource) {
- if (aResource != null && primGetResources() != null) {
- Iterator it = primGetResources().iterator();
- Association association;
- while (it.hasNext()) {
- association = (Association) it.next();
- if (association.getKey() == aResource)
- return primGetResources().remove(association);
- }
- }
- return false;
- }
-
- /**
- * Set the context to add all copied resources into. Creation date: (12/17/2000 8:09:45 PM)
- *
- * @param newCopyContext
- * org.eclipse.emf.ecore.resource.Context
- */
- public void setCopyContext(org.eclipse.emf.ecore.resource.ResourceSet newCopyContext) {
- copyContext = newCopyContext;
- }
-
- /**
- * If an ID suffix is not defined for a EObject that is to be copied, this value will be used.
- * Creation date: (12/17/2000 1:44:43 PM)
- *
- * @param newDefaultIdSuffix
- * java.lang.String
- */
- public void setDefaultIdSuffix(java.lang.String newDefaultIdSuffix) {
- defaultIdSuffix = newDefaultIdSuffix;
- }
-
- /**
- * Should the id be copied in the case where no suffix is specified?
- */
- public void setPreserveIds(boolean value) {
- preserveIds = value;
- }
-
- /**
- * Subclasses should override this method if they require additional processing after the group
- * has been copied.
- *
- * @param copyUtil
- */
- public void postCopy(EtoolsCopyUtility copyUtil) {
- }
-
-}
-
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DOMLoadOptions.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DOMLoadOptions.java
deleted file mode 100644
index 05ae8a5ef..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DOMLoadOptions.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 12, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.utilities;
-
-/**
- * @author schacher
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class DOMLoadOptions {
- protected boolean validate;
- protected boolean allowJavaEncodings;
- protected boolean expandEntityRefererences;
-
- /**
- * @return boolean
- */
- public boolean isAllowJavaEncodings() {
- return allowJavaEncodings;
- }
-
- /**
- * @return boolean
- */
- public boolean isExpandEntityRefererences() {
- return expandEntityRefererences;
- }
-
- /**
- * @return boolean
- */
- public boolean isValidate() {
- return validate;
- }
-
- /**
- * Sets the allowJavaEncodings.
- *
- * @param allowJavaEncodings
- * The allowJavaEncodings to set
- */
- public void setAllowJavaEncodings(boolean allowJavaEncodings) {
- this.allowJavaEncodings = allowJavaEncodings;
- }
-
- /**
- * Sets the expandEntityRefererences.
- *
- * @param expandEntityRefererences
- * The expandEntityRefererences to set
- */
- public void setExpandEntityRefererences(boolean expandEntityRefererences) {
- this.expandEntityRefererences = expandEntityRefererences;
- }
-
- /**
- * Sets the validate.
- *
- * @param validate
- * The validate to set
- */
- public void setValidate(boolean validate) {
- this.validate = validate;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DOMUtilities.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DOMUtilities.java
deleted file mode 100644
index 7eeac6c9e..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DOMUtilities.java
+++ /dev/null
@@ -1,680 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * A class containing common dom manipulation and search functions.
- */
-public class DOMUtilities {
- // Handy Constants
- public static final String INDENT_STRING = "\t"; //$NON-NLS-1$
- public static final String NEWLINE_STRING = System.getProperty("line.separator"); //$NON-NLS-1$
- //Hack to be removed when the DOM apis change such that there is an easier
- //way to fluff up and set the doctype
- private static final String DUMMY_ENTITY_STRING = "dummy"; //$NON-NLS-1$
- private static final String DUMMY_ENTITY_NODE_STRING = "<dummy/>"; //$NON-NLS-1$
- private static DocumentBuilder defaultDocumentBuilder;
- private static EntityResolver defaultEntityResolver;
-
- /**
- * Returns an iterator that iterates over the sub nodes of a path.
- */
- static public Iterator createPathIterator(String path) {
- String tPath = path.startsWith("/") ? path.substring(1) : path; //$NON-NLS-1$
- if (tPath.length() == 0)
- tPath = null;
- final String aPath = tPath;
-
- return new Iterator() {
- int prevIndex = 0;
- int curIndex = 0;
- String pathString = aPath;
-
- public boolean hasNext() {
- return pathString != null && prevIndex != -1;
- }
-
- public Object next() {
- curIndex = pathString.indexOf('/', prevIndex);
- String nodeString = null;
- if (curIndex != -1)
- nodeString = pathString.substring(prevIndex, curIndex++);
- else
- nodeString = pathString.substring(prevIndex);
- prevIndex = curIndex;
- return nodeString;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
-
- /**
- * Get the text for the passed in node.
- */
- static public String getChildText(Node node) {
- Text textNode = getChildTextNode(node);
- if (textNode != null)
- return textNode.getData();
- return null;
- }
-
- /**
- * Get the text for the passed in node.
- */
- static public Text getChildTextNode(Node node) {
- Node textNode = node.getFirstChild();
- while (textNode != null && DOMUtilities.isTextNode(textNode)) {
- if (!isWhitespace(textNode))
- return (Text) textNode;
- textNode = textNode.getNextSibling();
- }
- return null;
- }
-
- /**
- * Return a string representing the current indentation of the node.
- */
- static public String getIndentString(Node node) {
- Revisit.toDo();
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Get the last non-text child of a node.
- *
- * @return org.w3c.dom.Node The last non-text child node of
- * @node.
- * @param node
- * org.w3c.dom.Node The node
- */
- public static Node getLastNodeChild(Node node) {
- if (node == null)
- return null;
- Node child = node.getLastChild();
- while (child != null && child.getNodeType() == Node.TEXT_NODE)
- child = child.getPreviousSibling();
- return child;
- }
-
- /**
- * Get the next non-text sibling after a node.
- *
- * @return org.w3c.dom.Node The first non-text sibling node after
- * @node. If there is no next non-text sibling, null is returned.
- * @param node
- * org.w3c.dom.Node The node
- */
- public static Node getNextNodeSibling(Node node) {
- Node sibling = node.getNextSibling();
- while (sibling != null && sibling.getNodeType() != Node.ELEMENT_NODE)
- sibling = sibling.getNextSibling();
- return sibling;
- }
-
- /**
- * Get the first child Node with the specified name
- */
- static public Node getNodeChild(Node node, String nodeName) {
- Node child = null;
- NodeList children = node.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- Node n = children.item(i);
- if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equals(nodeName)) {
- child = n;
- break;
- }
- }
- return child;
- }
-
- /**
- * Traverses the path passed in <pathName>. The path is a string in the form
- * 'node1/node2/node3'. This method starts at node.
- */
- static public Node getNodeChildForPath(Node parent, String pathName) {
-
- Node curNode = parent;
- Iterator i = DOMUtilities.createPathIterator(pathName);
- while (i.hasNext()) {
- String child = (String) i.next();
- curNode = DOMUtilities.getNodeChild(curNode, child);
- if (curNode == null)
- return null;
- }
- return curNode;
- }
-
- /**
- * Get the Node children with the specified names
- */
- static public List getNodeChildren(Node node, String[] nodeNames) {
- NodeList childNodes = node.getChildNodes();
- ArrayList results = new ArrayList();
-
- for (int i = 0; i < childNodes.getLength(); i++) {
- Node n = childNodes.item(i);
- if (n.getNodeType() == Node.ELEMENT_NODE) {
- boolean found = false;
- for (int j = 0; j < nodeNames.length; j++) {
- if (nodeNames[j].equals(n.getNodeName())) {
- found = true;
- break;
- }
- }
- if (found)
- results.add(n);
- }
- }
- return results;
- }
-
- /**
- * Get the Node children with the specified name
- */
- static public List getNodeChildren(Node node, String nodeName) {
- NodeList childNodes = node.getChildNodes();
- ArrayList results = new ArrayList();
-
- for (int i = 0; i < childNodes.getLength(); i++) {
- Node n = childNodes.item(i);
- if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equals(nodeName))
- results.add(n);
- }
- return results;
- }
-
- /**
- * Get the first non-text sibling before a node.
- *
- * @return org.w3c.dom.Node The first non-text sibling node before
- * @node. If there is no previous non-text sibling, null is returned.
- * @param node
- * org.w3c.dom.Node The node
- */
- public static Node getPreviousNodeSibling(Node node) {
- if (node == null)
- return null;
- Node sibling = node.getPreviousSibling();
- while (sibling != null && DOMUtilities.isTextNode(sibling))
- sibling = sibling.getPreviousSibling();
- return sibling;
- }
-
- /**
- * Get the first text node before a node.
- *
- * @return org.w3c.dom.Node The first text node before
- * @node. Null if no such node exist.
- * @param node
- * org.w3c.dom.Node The node
- */
- public static Text getPreviousText(Node node) {
- Text sibling = getPreviousTextSibling(node);
-
- if (sibling == null && node.getParentNode() != null)
- sibling = getPreviousText(node.getParentNode());
-
- return sibling;
- }
-
- /**
- * Get the first text sibling before a node.
- *
- * @return org.w3c.dom.Node The first text sibling node before
- * @node. If there is no previous text sibling, null is returned.
- * @param node
- * org.w3c.dom.Node The node
- */
- public static Text getPreviousTextSibling(Node node) {
- Assert.isNotNull(node);
-
- Node sibling = node.getPreviousSibling();
- Node lastText = null;
- while (sibling != null && sibling.getNodeType() == Node.TEXT_NODE) {
- lastText = sibling;
- sibling = sibling.getPreviousSibling();
- }
- return (Text) lastText;
- }
-
- /**
- * Get the first text sibling before a node.
- *
- * @return org.w3c.dom.Node The first text sibling node before
- * @node. If there is no previous text sibling, null is returned.
- * @param node
- * org.w3c.dom.Node The node
- */
- public static String getTrailingWhitespace(Text node) {
- Assert.isNotNull(node);
-
- String text = node.getData();
- if (text.length() == 0)
- return ""; //$NON-NLS-1$
-
- int i = text.length() - 1;
- for (; i >= 0; i--) {
- if (!Character.isWhitespace(text.charAt(i))) {
- break;
- }
- }
-
- return text.substring(++i);
- }
-
- /**
- * Inserts <newNode>into <parent>after <refNode>. If <refNode>is null then the node is inserted
- * to the beginning of the parent's child nodes.
- *
- * @param parent
- * org.w3c.dom.Node
- * @param newNode
- * org.w3c.dom.Node
- * @param refNode
- * org.w3c.dom.Node
- */
- public static void insertAfterNode(Node parent, Node newNode, Node refNode) {
- Node insertBeforeNode = null;
- if (refNode != null) {
- insertBeforeNode = refNode.getNextSibling();
- }
- if (refNode == null)
- insertBeforeNode(parent, newNode, parent.getFirstChild());
- else
- insertBeforeNode(parent, newNode, insertBeforeNode);
- }
-
- /**
- * Insert a <newNode>into <parent>before <refNode>. This utility method is used to ensure that
- * the insertion does not result in two adjacent text nodes. The DOM model does not handle
- * adjacent text nodes. They must be joined together.
- *
- * @param newNode
- * org.w3c.dom.Node
- * @param newNode
- * org.w3c.dom.Node
- * @param refNode
- * org.w3c.dom.Node
- */
- static public void insertBeforeNode(Node parent, Node newNode, Node refNode) {
- if (newNode.getNodeType() == Node.TEXT_NODE) {
- Text textNewNode = (Text) newNode;
-
- // If the insert before node is text, join it with the new node.
- if (refNode != null && refNode.getNodeType() == Node.TEXT_NODE) {
- Text textRefNode = (Text) refNode;
- textRefNode.setData(textNewNode.getData() + textRefNode.getData());
- return;
- }
- // If the node we are inserting after is text,
- // join it with the new node.
- Node insertAfterNode = (refNode == null) ? parent.getLastChild() : refNode.getPreviousSibling();
- if (insertAfterNode != null && insertAfterNode.getNodeType() == Node.TEXT_NODE) {
- Text textInsertAfterNode = (Text) insertAfterNode;
- textInsertAfterNode.setData(textInsertAfterNode.getData() + textNewNode.getData());
- return;
- }
- }
- // There is no text node to join to, simple insert the node.
- parent.insertBefore(newNode, refNode);
- }
-
- /**
- * Insert a <newNode>into <parent>before <refNode>. This method will also insert the node before
- * any whitespace nodes that appear in the tree before <refNode>. This method will also ensure
- * that the insertion does not result in two adjacent text nodes. The DOM model does not handle
- * adjacent text nodes. They must be joined together.
- *
- * @param newNode
- * org.w3c.dom.Node
- * @param newNode
- * org.w3c.dom.Node
- * @param refNode
- * org.w3c.dom.Node
- */
- static public void insertBeforeNodeAndWhitespace(Node parent, Node newNode, Node refNode) {
- Node curNode = (refNode == null) ? parent.getLastChild() : refNode.getPreviousSibling();
- Node lastNode = refNode;
-
- while (curNode != null && (DOMUtilities.isWhitespace(curNode) || DOMUtilities.isComment(curNode))) {
- lastNode = curNode;
- curNode = curNode.getPreviousSibling();
- }
-
- insertBeforeNode(parent, newNode, lastNode);
- }
-
- /**
- * Return whether the node is a text node.
- *
- * @return boolean Answer true if the node is a text node, false otherwise.
- * @param node
- * org.w3c.dom.Node The node to check
- */
- static public boolean isTextNode(Node node) {
- Assert.isNotNull(node);
- return (node.getNodeType() == Node.TEXT_NODE) || (node.getNodeType() == Node.CDATA_SECTION_NODE);
- }
-
- /**
- * Return whether the node is entirely comment or not.
- *
- * @return boolean Answer true if the node is whitespace, false otherwise.
- * @param node
- * org.w3c.dom.Node The node to check
- */
- static public boolean isComment(Node node) {
- Assert.isNotNull(node);
-
- return node.getNodeType() == Node.COMMENT_NODE;
- }
-
- /**
- * Return whether the node is entirely whitepace or not.
- *
- * @return boolean Answer true if the node is whitespace, false otherwise.
- * @param node
- * org.w3c.dom.Node The node to check
- */
- static public boolean isWhitespace(Node node) {
- Assert.isNotNull(node);
-
- if (node.getNodeType() != Node.TEXT_NODE)
- return false;
-
- Text textNode = (Text) node;
- String text = textNode.getData();
- if (text == null)
- return false;
-
- for (int i = 0; i < text.length(); i++) {
- if (!Character.isWhitespace(text.charAt(i))) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Remove all the children of <node>
- */
- static public void removeAllChildren(Node node) {
- NodeList list = node.getChildNodes();
- for (int i = 0; i < list.getLength(); i++) {
- node.removeChild(list.item(i));
- }
- }
-
- // traverses the DOM starting at the specified node and returns a list
- // of nodes matching the search string
-
- static public ArrayList getAllNodes(Node node, String nodeName) {
- ArrayList nodeList = new ArrayList();
-
- String[] nodeNames = {nodeName};
- findAllNodes(node, nodeNames, nodeList);
-
- return nodeList;
- }
-
- // traverses the DOM starting at the specified node and returns a list
- // of nodes matching the search strings
-
- static public ArrayList getAllNodes(Node node, String[] nodeNamesArray) {
- ArrayList nodeList = new ArrayList();
- findAllNodes(node, nodeNamesArray, nodeList);
-
- return nodeList;
- }
-
- // recursive helper for getAllNodes
- static private void findAllNodes(Node node, String[] nodeNames, ArrayList results) {
-
- NodeList nodes = node.getChildNodes();
- if (nodes != null) {
- for (int i = 0; i < nodes.getLength(); i++) {
- for (int j = 0; j < nodeNames.length; j++) {
- if (nodes.item(i).getNodeName().equals(nodeNames[j])) {
- results.add(nodes.item(i));
- }
- }
- findAllNodes(nodes.item(i), nodeNames, results);
- }
- }
- }
-
- /**
- * Returns the system defined JAXP document builder
- */
- static public DocumentBuilder newDefaultDocumentBuilder(DOMLoadOptions options) throws ParserConfigurationException {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setValidating(options.isValidate());
- dbf.setNamespaceAware(options.isValidate());
- /*
- * Causes errors in IBM JDK try { dbf.setAttribute(Renderer.JAXP_SCHEMA_LANGUAGE,
- * Renwderer.W3C_XML_SCHEMA); } catch (IllegalArgumentException x) { }
- */
- try {
- dbf.setAttribute("http://apache.org/xml/features/allow-java-encodings", new Boolean(options.isAllowJavaEncodings())); //$NON-NLS-1$
- } catch (IllegalArgumentException ignore) {
- Logger.getLogger().log("Warning: Parser does not support \"http://apache.org/xml/features/allow-java-encodings\"."); //$NON-NLS-1$
- }
- try {
- dbf.setAttribute("http://apache.org/xml/features/validation/schema", new Boolean(options.isValidate())); //$NON-NLS-1$
- } catch (IllegalArgumentException ignore) {
- dbf.setValidating(false);
- Logger.getLogger().log("Warning: Parser does not support \"http://apache.org/xml/features/validation/schema\". Validation will be disabled."); //$NON-NLS-1$
- }
- dbf.setExpandEntityReferences(options.isExpandEntityRefererences());
- DocumentBuilder result = dbf.newDocumentBuilder();
- result.setErrorHandler(new ErrorHandler() {
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
- */
- public void error(SAXParseException arg0) throws SAXException {
- throw arg0;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
- */
- public void fatalError(SAXParseException arg0) throws SAXException {
- throw arg0;
- }
-
- public void warning(SAXParseException arg0) throws SAXException {
- Logger.getLogger().logWarning(arg0);
- }
-
- });
- return result;
- }
-
- /**
- * Creates a stub document, where the DocumentType is defined by the parameters.
- */
- static public Document createNewDocument(String doctype, String publicId, String systemId) throws ParserConfigurationException, SAXException, IOException {
- DocumentBuilder builder = getDefaultDocumentBuilder();
- InputStream in = createHeaderInputStream(doctype, publicId, systemId, true);
- Document result = builder.parse(in);
- removeDummyEntity(result);
- removeExtraneousComments(result);
- return result;
- }
-
- public static Document loadDocument(InputStream in, DOMLoadOptions options, EntityResolver resolver) throws ParserConfigurationException, SAXException, IOException {
- DocumentBuilder builder = DOMUtilities.newDefaultDocumentBuilder(options);
- builder.setEntityResolver(resolver);
- Document result = builder.parse(in);
- removeExtraneousComments(result);
- return result;
- }
-
- /**
- * At the time of this writing, the DOM Level 2 APIs are not advanced enough for setting the
- * document type; so the only parser independent way of accomplishing this is by creating a
- * stream and parsing it.
- */
- public static InputStream createHeaderInputStream(String doctype, String publicId, String systemId) {
- return createHeaderInputStream(doctype, publicId, systemId, false);
- }
-
-
- private static InputStream createHeaderInputStream(String doctype, String publicId, String systemId, boolean includeDummy) {
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- PrintWriter writer = new PrintWriter(outputStream);
- writeHeader(writer, doctype, publicId, systemId);
- if (includeDummy)
- addDummyEntity(writer);
- writer.flush();
- writer.close();
- return new java.io.ByteArrayInputStream(outputStream.toByteArray());
- }
-
- private static void writeHeader(PrintWriter writer, String doctype, String publicId, String systemId) {
- writer.write("<?xml version=\""); //$NON-NLS-1$
- writer.write("1.0"); //$NON-NLS-1$
- writer.write("\" encoding=\""); //$NON-NLS-1$
- writer.write("UTF-8"); //$NON-NLS-1$
- writer.write("\"?>"); //$NON-NLS-1$
- writer.println();
-
- if (doctype != null) {
- writer.write("<!DOCTYPE "); //$NON-NLS-1$
- writer.write(doctype);
- writer.write(" PUBLIC \""); //$NON-NLS-1$
- writer.write(publicId);
- writer.write("\" \""); //$NON-NLS-1$
- writer.write(systemId);
- writer.write("\">"); //$NON-NLS-1$
- writer.println();
- }
- }
-
- private static void addDummyEntity(PrintWriter writer) {
- Revisit.revisit();
- writer.println(DUMMY_ENTITY_NODE_STRING);
- //Major hack because we can not parse an empty document
- }
-
- private static void removeDummyEntity(Document doc) {
- doc.removeChild(getNodeChild(doc, DUMMY_ENTITY_STRING));
- }
-
- private static void removeExtraneousComments(Document doc) {
- //another major hack because of a bug in XML4J 4.0.7 that added all the
- //comments from the dtd to the document. Can be removed after we move up
- //Xerces levels
- Node aNode = doc.getFirstChild();
- while (aNode != null) {
- Node nextNode = aNode.getNextSibling();
- if (aNode.getNodeType() == Node.COMMENT_NODE)
- doc.removeChild(aNode);
- aNode = nextNode;
- }
- }
-
- /**
- * For performance, cache a static instance of the JAXP registered document builder. Validation
- * is disabled for this instance. If you need validation, use
- * {@link #newDefaultDocumentBuilder(boolean, boolean, boolean)}
- *
- * @return DocumentBuilder
- * @throws ParserConfigurationException
- * if JAXP is not configured correctly
- */
- public static DocumentBuilder getDefaultDocumentBuilder() throws ParserConfigurationException {
- if (defaultDocumentBuilder == null) {
- DOMLoadOptions opts = new DOMLoadOptions();
- opts.setAllowJavaEncodings(true);
- opts.setExpandEntityRefererences(true);
- opts.setValidate(false);
- defaultDocumentBuilder = newDefaultDocumentBuilder(opts);
- defaultDocumentBuilder.setEntityResolver(defaultEntityResolver);
- defaultDocumentBuilder.setErrorHandler(new ErrorHandler() {
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
- */
- public void error(SAXParseException exception) throws SAXException {
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
- */
- public void fatalError(SAXParseException exception) throws SAXException {
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException)
- */
- public void warning(SAXParseException exception) throws SAXException {
-
- }
-
- });
- }
-
- return defaultDocumentBuilder;
- }
-
- /**
- * @return
- */
- public static EntityResolver getDefaultEntityResolver() {
- return defaultEntityResolver;
- }
-
- /**
- * @param resolver
- */
- public static void setDefaultEntityResolver(EntityResolver resolver) {
- defaultEntityResolver = resolver;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DanglingHREFException.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DanglingHREFException.java
deleted file mode 100644
index 21f9254f7..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DanglingHREFException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on May 12, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.utilities;
-
-/**
- * Exception thrown when a proxy can not be resolved
- */
-public class DanglingHREFException extends Exception {
-
-
- public DanglingHREFException() {
- super();
- }
-
- /**
- * @param s
- */
- public DanglingHREFException(String s) {
- super(s);
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DefaultFeatureValueConverter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DefaultFeatureValueConverter.java
deleted file mode 100644
index 2cfb9a759..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DefaultFeatureValueConverter.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-
-/**
- * Insert the type's description here. Creation date: (5/10/2001 2:49:49 PM)
- *
- * @author: Administrator
- */
-public class DefaultFeatureValueConverter implements FeatureValueConverter {
- private static final String FAILED_CONVERSION_PATTERN = WFTUtilsResourceHandler.Failed_to_convert__0__to___ERROR_; //$NON-NLS-1$ = "Failed to convert {0} to {1}."
-
- /**
- * DefaultFeatureValueConverter constructor comment.
- */
- public DefaultFeatureValueConverter() {
- super();
- }
-
- /**
- * Convert
- *
- * @aValue to a Boolean.
- */
- protected Object convertToBoolean(Object aValue) {
- if (aValue instanceof String)
- return Boolean.valueOf((String) aValue);
- if (aValue instanceof Boolean)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.Boolean_UI_); //$NON-NLS-1$ = "Boolean"
- }
-
- /**
- * Convert
- *
- * @aValue to a Byte.
- */
- protected Object convertToByte(Object aValue) {
- if (aValue instanceof String)
- return Byte.valueOf((String) aValue);
- if (aValue instanceof Byte)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.Byte_UI_); //$NON-NLS-1$ = "Byte"
- }
-
- /**
- * Convert
- *
- * @aValue to a Character.
- */
- protected Object convertToCharacter(Object aValue) {
- if (aValue instanceof String && ((String) aValue).length() == 1)
- return new Character(((String) aValue).charAt(0));
- if (aValue instanceof Character)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.Character_UI_); //$NON-NLS-1$ = "Character"
- }
-
- /**
- * Convert
- *
- * @aValue to a Double.
- */
- protected Object convertToDouble(Object aValue) {
- if (aValue instanceof String) {
- try {
- return Double.valueOf((String) aValue);
- } catch (NumberFormatException e) {
- return defaultDouble();
- }
- }
- if (aValue instanceof Double)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.Double_UI_); //$NON-NLS-1$ = "Double"
- }
-
- /**
- * Convert
- *
- * @aValue to a EEnumLiteral.
- */
- protected Object convertToEnum(Object aValue, EStructuralFeature aFeature) {
- EEnumLiteral literal = null;
- EEnum eenum = (EEnum) aFeature.getEType();
- if (aValue instanceof String)
- literal = eenum.getEEnumLiteral((String) aValue);
- else if (aValue instanceof Integer)
- literal = eenum.getEEnumLiteral(((Integer) aValue).intValue());
- else if (aValue instanceof EEnumLiteral)
- literal = (EEnumLiteral) aValue;
-
- if (literal == null)
- return failedToConvert(aValue, WFTUtilsResourceHandler.Enumeration_UI_); //$NON-NLS-1$ = "Enumeration"
-
- return literal.getInstance();
- }
-
- /**
- * Convert
- *
- * @aValue to a Float.
- */
- protected Object convertToFloat(Object aValue) {
- if (aValue instanceof String) {
- try {
- return Float.valueOf((String) aValue);
- } catch (NumberFormatException e) {
- return defaultFloat();
- }
- }
- if (aValue instanceof Float)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.Float_UI_); //$NON-NLS-1$ = "Float"
- }
-
- /**
- * Convert
- *
- * @aValue to a Integer.
- */
- protected Object convertToInteger(Object aValue) {
- if (aValue instanceof String) {
- try {
- return Integer.valueOf((String) aValue);
- } catch (NumberFormatException e) {
- return defaultInteger();
- }
- }
- if (aValue instanceof Integer)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.Integer_UI_); //$NON-NLS-1$ = "Integer"
- }
-
- /**
- * Convert
- *
- * @aValue to a Java Object.
- */
- protected Object convertToJavaObject(Object aValue) {
- return aValue;
- }
-
- /**
- * Convert
- *
- * @aValue to a Long.
- */
- protected Object convertToLong(Object aValue) {
- if (aValue instanceof String) {
- try {
- return Long.valueOf((String) aValue);
- } catch (NumberFormatException e) {
- return defaultLong();
- }
- }
- if (aValue instanceof Long)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.Long_UI_); //$NON-NLS-1$ = "Long"
- }
-
- /**
- * Convert
- *
- * @aValue to a MofObject.
- */
- protected Object convertToMofObject(Object aValue) {
- if (aValue instanceof EObject)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.MofObject_UI_); //$NON-NLS-1$ = "MofObject"
- }
-
- /**
- * Convert
- *
- * @aValue to a Short.
- */
- protected Object convertToShort(Object aValue) {
- if (aValue instanceof String) {
- try {
- return Short.valueOf((String) aValue);
- } catch (NumberFormatException e) {
- return defaultShort();
- }
- }
- if (aValue instanceof Short)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.Short_UI_); //$NON-NLS-1$ = "Short"
- }
-
- /**
- * Convert
- *
- * @aValue to a String.
- */
- protected Object convertToString(Object aValue) {
- return aValue.toString();
- }
-
- /**
- * Convert
- *
- * @aValue to the type of
- * @anAttribute.
- */
- protected Object convertValue(Object aValue, org.eclipse.emf.ecore.EAttribute anAttribute) {
-
- EClassifier meta = anAttribute.getEType();
- if (meta.eClass() == EcorePackage.eINSTANCE.getEEnum())
- return convertToEnum(aValue, anAttribute);
- switch (meta.getClassifierID()) {
- case EcorePackage.ESTRING :
- return convertToString(aValue);
- case EcorePackage.EBOOLEAN_OBJECT :
- case EcorePackage.EBOOLEAN :
- return convertToBoolean(aValue);
- case EcorePackage.EINTEGER_OBJECT :
- case EcorePackage.EINT :
- return convertToInteger(aValue);
- case EcorePackage.EFLOAT_OBJECT :
- case EcorePackage.EFLOAT :
- return convertToFloat(aValue);
- case EcorePackage.ECHARACTER_OBJECT :
- case EcorePackage.ECHAR :
- return convertToCharacter(aValue);
- case EcorePackage.ELONG_OBJECT :
- case EcorePackage.ELONG :
- return convertToLong(aValue);
- case EcorePackage.EBYTE_OBJECT :
- case EcorePackage.EBYTE :
- return convertToByte(aValue);
- case EcorePackage.EDOUBLE_OBJECT :
- case EcorePackage.EDOUBLE :
- return convertToDouble(aValue);
- case EcorePackage.ESHORT_OBJECT :
- case EcorePackage.ESHORT :
- return convertToShort(aValue);
- // case EcorePackage.EENUM:
- // return convertToEnum(aValue, anAttribute);
- case EcorePackage.EOBJECT :
- return convertToMofObject(aValue);
- case EcorePackage.EJAVA_OBJECT :
- return convertToJavaObject(aValue);
- }
- return aValue;
- }
-
- /**
- * Convert
- *
- * @aValue to the type of
- * @aFeature.
- */
- public Object convertValue(Object aValue, org.eclipse.emf.ecore.EStructuralFeature aFeature) {
- if (aValue == null || aFeature == null || !(aFeature instanceof EAttribute))
- return aValue; //nothing to convert
- return convertValue(aValue, (EAttribute) aFeature);
- }
-
- /**
- * Return the default Double value.
- */
- protected Double defaultDouble() {
- return null;
- }
-
- /**
- * Return the default Float value.
- */
- protected Float defaultFloat() {
- return null;
- }
-
- /**
- * Return the default Integer value.
- */
- protected Integer defaultInteger() {
- return null;
- }
-
- /**
- * Return the default Long value.
- */
- protected Long defaultLong() {
- return null;
- }
-
- /**
- * Return the default Short value.
- */
- protected Short defaultShort() {
- return null;
- }
-
- /**
- * Failed to convert
- *
- * @aValue.
- */
- protected Object failedToConvert(Object aValue, String aString) {
- String errorString = java.text.MessageFormat.format(FAILED_CONVERSION_PATTERN, new String[]{aValue.toString(), aString});
- throw new FeatureValueConversionException(errorString);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DefaultOverridableResourceFactoryRegistry.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DefaultOverridableResourceFactoryRegistry.java
deleted file mode 100644
index c3777bfd2..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DefaultOverridableResourceFactoryRegistry.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 14, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.Resource.Factory;
-import org.eclipse.emf.ecore.resource.impl.ResourceFactoryRegistryImpl;
-
-/**
- * @author DABERG
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class DefaultOverridableResourceFactoryRegistry extends ResourceFactoryRegistryImpl {
- protected static Resource.Factory GLOBAL_FACTORY = Resource.Factory.Registry.INSTANCE.getFactory(URI.createURI(DEFAULT_EXTENSION));
-
- /**
- *
- */
- public DefaultOverridableResourceFactoryRegistry() {
- super();
- }
-
- public Resource.Factory getFactory(URI uri) {
- Object resourceFactory = null;
- if (resourceFactory == null) {
- String protocol = uri.scheme();
- resourceFactory = protocolToFactoryMap.get(protocol);
- if (resourceFactory == null) {
- String extension = uri.fileExtension();
- resourceFactory = extensionToFactoryMap.get(extension);
- if (resourceFactory == null) {
- resourceFactory = delegatedGetFactory(uri);
- if (resourceFactory == GLOBAL_FACTORY) {
- resourceFactory = (Factory) extensionToFactoryMap.get(Resource.Factory.Registry.DEFAULT_EXTENSION);
- if (resourceFactory == null)
- resourceFactory = GLOBAL_FACTORY;
- }
-
- }
- }
- }
-
- return resourceFactory instanceof Resource.Factory.Descriptor ? ((Resource.Factory.Descriptor) resourceFactory).createFactory() : (Resource.Factory) resourceFactory;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.resource.impl.ResourceFactoryRegistryImpl#delegatedGetFactory(org.eclipse.emf.common.util.URI)
- */
- protected Factory delegatedGetFactory(URI uri) {
- return Resource.Factory.Registry.INSTANCE.getFactory(uri);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DeferredReferenceUtilityAction.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DeferredReferenceUtilityAction.java
deleted file mode 100644
index ec1f66830..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DeferredReferenceUtilityAction.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * Insert the type's description here. Creation date: (12/15/2000 5:25:43 PM)
- *
- * @author: Administrator
- */
-public abstract class DeferredReferenceUtilityAction {
- protected EReference reference;
- protected Object referenceValue;
- protected EObject copyContainer;
- protected String idSuffix;
-
- /**
- * DeferredCopy constructor comment.
- */
- public DeferredReferenceUtilityAction(EReference aReference, Object aValue, String aSuffix, EObject aCopyContainer) {
- reference = aReference;
- referenceValue = aValue;
- idSuffix = aSuffix;
- copyContainer = aCopyContainer;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/16/2000 9:32:28 AM)
- *
- * @return org.eclipse.emf.ecore.EObject
- */
- public org.eclipse.emf.ecore.EObject getCopyContainer() {
- return copyContainer;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/15/2000 5:34:56 PM)
- *
- * @return java.lang.String
- */
- public java.lang.String getIdSuffix() {
- return idSuffix;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/15/2000 5:34:56 PM)
- *
- * @return org.eclipse.emf.ecore.EReference
- */
- public org.eclipse.emf.ecore.EReference getReference() {
- return reference;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/16/2000 9:32:28 AM)
- *
- * @return java.lang.Object
- */
- public Object getReferenceValue() {
- return referenceValue;
- }
-
- public abstract void performAction();
-}
-
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EncoderDecoder.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EncoderDecoder.java
deleted file mode 100644
index 69fe06b94..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EncoderDecoder.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-/**
- * Represents an interface to an object which can encode and decode values. This typically involves
- * cryptography algorithms. This interface, along with the supplied adapters provide an extension
- * mechanism for pluggable crytography that can be used when storing and retrieving attribute
- * values, and is used prevalently for encoding and decoding password values of mof objects.
- */
-public interface EncoderDecoder {
- /**
- * Returns a decoded version of the value.
- */
- public String decode(String value);
-
- /**
- * Returns an encoded version of the value.
- */
- public String encode(String value);
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EncoderDecoderAdapter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EncoderDecoderAdapter.java
deleted file mode 100644
index 788b30062..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EncoderDecoderAdapter.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-/**
- * An adapter for EncoderDecoder implementations
- */
-public abstract class EncoderDecoderAdapter implements EncoderDecoder {
-
- /**
- * EncoderDecoderAdapter constructor comment.
- */
- public EncoderDecoderAdapter() {
- super();
- }
-
- /**
- * Returns a decoded version of the value.
- */
- public abstract String decode(String value);
-
- /**
- * Returns an encoded version of the value.
- */
- public abstract String encode(String value);
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EncoderDecoderRegistry.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EncoderDecoderRegistry.java
deleted file mode 100644
index d6151123c..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EncoderDecoderRegistry.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Registry for storing and retrieving value decoders and encoders. Usage Example:
- *
- * <pre>
- *
- *
- * // Use the standard WebSphere password value encoder/decoder.
- * EncoderDecoderRegistry.getDefaultRegistry().setDefaultEncoderDecoder(new com.ibm.ejs.security.util.WASEncoderDecoder());
- * // Begin tracking changes...
- * WriteBackHelper.begin();
- * // Load a resource which may have un-encoded values...
- * // Note: The WCCM will attempt to detect un-encoded values. If unencoded values
- * // are found, the value will be encoded, and the resource will be added to the
- * // WriteBackHelper.
- * Resource res = resourceSet.load(&quot;myResource&quot;);
- * // Ensure that any changes due to encoding are written back out.
- * WriteBackHelper.end();
- * </pre>
- */
-public class EncoderDecoderRegistry {
- protected static EncoderDecoderRegistry _defaultInstance;
- public static final EncoderDecoder INITIAL_DEFAULT_ENCODER = PassthruEncoderDecoder.INSTANCE;
- protected Map encoders = new HashMap();
- protected Object defaultEncoderKey;
-
- /**
- * EncoderDecoderRegistry constructor comment.
- */
- public EncoderDecoderRegistry() {
- super();
- initializeDefaultEncoders();
- }
-
- /**
- * Insert the method's description here. Creation date: (2/2/2001 12:43:31 AM)
- */
- public void addEncoderDecoder(EncoderDecoder encoderDecoder) {
- encoders.put(encoderDecoder.getClass().getName(), encoderDecoder);
- if (defaultEncoderKey == null)
- defaultEncoderKey = encoderDecoder.getClass().getName();
- }
-
- /**
- * Returns an encoder/decoder by key.
- */
- public EncoderDecoder getDefaultEncoderDecoder() {
- if (defaultEncoderKey == null)
- return null;
- return (EncoderDecoder) encoders.get(defaultEncoderKey);
- }
-
- /**
- * Returns the default registry to use for retrieving value encoders and decoders
- */
- public static EncoderDecoderRegistry getDefaultRegistry() {
- if (_defaultInstance == null) {
- _defaultInstance = new EncoderDecoderRegistry();
- }
- return _defaultInstance;
- }
-
- /**
- * Returns an encoder/decoder by key.
- */
- public EncoderDecoder getEncoderDecoder(Object key) {
- return (EncoderDecoder) encoders.get(key);
- }
-
- /**
- * Initializes a standard set of encoder/decoders.
- */
- public void initializeDefaultEncoders() {
- setDefaultEncoderDecoder(INITIAL_DEFAULT_ENCODER);
- addEncoderDecoder(new XMLValueEncoderDecoder());
- }
-
- /**
- * Removes the encoder/decoder with the specified key.
- */
- public void removeEncoderDecoder(Object key) {
- if (encoders.containsKey(key)) {
- encoders.remove(key);
- }
- }
-
- /**
- * Returns an encoder/decoder by key.
- */
- public void setDefaultEncoderDecoder(EncoderDecoder encoder) {
- defaultEncoderKey = encoder.getClass().getName();
- if (!encoders.containsKey(defaultEncoderKey)) {
- addEncoderDecoder(encoder);
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EtoolsCopySession.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EtoolsCopySession.java
deleted file mode 100644
index ca678b898..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EtoolsCopySession.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.emf.common.notify.impl.NotificationImpl;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-
-/**
- * Insert the type's description here. Creation date: (05/04/01 11:25:59 PM)
- *
- * @author: Administrator
- */
-public class EtoolsCopySession extends EtoolsCopyUtility {
- public static final int RESOURCE_COPIED = 500;
- private EtoolsCopyUtility parentCopyUtility;
- private XMLResource currentResource;
- private XMLResource currentCopyResource;
-
- /**
- * EtoolsCopySession constructor comment.
- */
- public EtoolsCopySession(EtoolsCopyUtility aCopyUtility) {
- parentCopyUtility = aCopyUtility;
- setPreserveIds(aCopyUtility.preserveIds());
- setCopyAdapters(aCopyUtility.isCopyAdapters());
- }
-
- /**
- * Copy all Resources and RefObjects within <code>aGroup</code> and add them to
- * <code>aGroup</code>. Non composite references will be deferred until all objects are
- * copied from <code>aGroup</code>.
- *
- * Copy Resources first and then copy RefObjects.
- */
- public void copy(CopyGroup aGroup) {
- if (aGroup != null) {
- copyResources(aGroup);
- copyRefObjects(aGroup);
- executeDeferredCopyActions();
- aGroup.postCopy(this);
- notifyNewResourcesCopied(aGroup);
- }
- }
-
- /**
- * This method should be used if you are only going to copy <code>aRefObject</code> in this
- * copy execution.
- */
- public EObject copy(EObject aRefObject, String idSuffix) {
- EObject copied = containmentCopy(aRefObject, idSuffix);
- executeDeferredCopyActions();
- return copied;
- }
-
- /**
- * This method should be used if you are only going to copy <code>aRefObject</code> in this
- * copy execution. This method only copies <code>aRefObject</code> attributes.
- */
- public EObject copyObject(EObject aRefObject, String idSuffix) {
- EObject copied = containmentCopyObject(aRefObject, idSuffix);
- executeDeferredCopyActions();
- return copied;
- }
-
- /**
- * This method should be used if you are only going to copy <code>aResource</code> in this
- * copy execution. The copied Resource will have a URI equal to <code>newUri</code>.
- */
- public Resource copy(Resource aResource, String newUri) {
- Resource copied = containmentCopy(aResource, newUri);
- executeDeferredCopyActions();
- copyModificationFlag(aResource, copied);
- notifyNewResourceCopied(copied);
- return copied;
- }
-
- protected void notifyNewResourcesCopied(CopyGroup group) {
- List copied = group.getCopiedResources();
- for (int i = 0; i < copied.size(); i++) {
- notifyNewResourceCopied((Resource) copied.get(i));
- }
- }
-
- protected void notifyNewResourceCopied(Resource copied) {
- copied.eNotify(new NotificationImpl(RESOURCE_COPIED, null, null));
- }
-
- /**
- * @see com.ibm.etools.emf.ecore.utilities.copy.EtoolsCopyUtility#primCopyObject(EObject,
- * String)
- */
- protected EObject primCopyObject(EObject aRefObject, String idSuffix) {
- EObject copy = super.primCopyObject(aRefObject, idSuffix);
- copyIdIfNecessary(aRefObject, copy, idSuffix);
- return copy;
- }
-
- protected void copyIdIfNecessary(EObject obj, EObject copy, String idSuffix) {
- if ((idSuffix == null && !preserveIds) || currentResource == null)
- return;
- String id = currentResource.getID(obj);
- if (id == null)
- return;
- id = idSuffix == null ? id : id + idSuffix;
- currentCopyResource.setID(copy, id);
- }
-
-
- /**
- * Set delivery back on for all the cached objects and push them to the parentCopyUtility.
- */
- public void flush() {
- Iterator it = getCopiedObjects().entrySet().iterator();
- Map parentCopies = getParentCopyUtility().getCopiedObjects();
- Map.Entry entry;
- EObject copy;
- while (it.hasNext()) {
- entry = (Map.Entry) it.next();
- copy = (EObject) entry.getValue();
- copy.eSetDeliver(true);
- parentCopies.put(entry.getKey(), copy);
- }
- copiedObjects = null;
- }
-
- /**
- * Return a cached copy.
- */
- public EObject getCopy(EObject anObject) {
- EObject copied = super.getCopy(anObject);
- if (copied == null)
- copied = getParentCopyUtility().getCopy(anObject);
- return copied;
- }
-
- /**
- * Insert the method's description here. Creation date: (05/04/01 11:28:07 PM)
- *
- * @return com.ibm.etools.emf.ecore.utilities.copy.EtoolsCopyUtility
- */
- protected EtoolsCopyUtility getParentCopyUtility() {
- return parentCopyUtility;
- }
-
- /**
- * Return an instance of EObject that is the same type as <code>aRefObject</code>.
- */
- public EObject newInstance(EObject aRefObject) {
- EObject newType = super.newInstance(aRefObject);
- newType.eSetDeliver(false);
- return newType;
- }
-
- /**
- * @see com.ibm.etools.emf.ecore.utilities.copy.EtoolsCopyUtility#newInstance(Resource, String)
- */
- public Resource newInstance(Resource aResource, String newUri) {
- Resource copy = super.newInstance(aResource, newUri);
- if (aResource instanceof XMLResource) {
- currentResource = (XMLResource) aResource;
- currentCopyResource = (XMLResource) copy;
- } else {
- currentResource = null;
- currentCopyResource = null;
- }
- return copy;
- }
-
-}
-
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EtoolsCopyUtility.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EtoolsCopyUtility.java
deleted file mode 100644
index fa2455623..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EtoolsCopyUtility.java
+++ /dev/null
@@ -1,669 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.ETypedElement;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.resource.Resource;
-
-
-/**
- * Insert the type's description here. Creation date: (12/13/2000 9:10:55 PM)
- *
- * @author: Administrator
- */
-public class EtoolsCopyUtility {
- protected static final String REFENUMLITERAL_TYPE_NAME = "EEnumLiteral"; //$NON-NLS-1$
- private final EcorePackage pkg = EcorePackage.eINSTANCE;
-
- private final ETypedElement METAENAME = pkg.getENamedElement_Name();
-
- protected HashMap copiedObjects;
- protected List deferredReferenceCopies;
- protected boolean preserveIds = false;
- protected boolean copyAdapters = false;
- protected HashMap copiedAdapters;
-
- protected class DeferredSingleReferenceCopyAction extends DeferredReferenceUtilityAction {
- public DeferredSingleReferenceCopyAction(EReference aReference, Object aValue, String aSuffix, EObject aCopyContainer) {
- super(aReference, aValue, aSuffix, aCopyContainer);
- }
-
- public void performAction() {
- EObject value = (EObject) getReferenceValue();
- getCopyContainer().eSet(getReference(), getCopyIfFound(value));
- }
- }
-
- protected class DeferredManyReferenceCopyAction extends DeferredReferenceUtilityAction {
- public DeferredManyReferenceCopyAction(EReference aReference, List aValue, String aSuffix, EObject aCopyContainer) {
- super(aReference, aValue, aSuffix, aCopyContainer);
- }
-
- public void performAction() {
- List copyList = (List) getCopyContainer().eGet(getReference());
- Iterator it = ((List) getReferenceValue()).iterator();
- EObject next;
- while (it.hasNext()) {
- next = (EObject) it.next();
- copyList.add(getCopyIfFound(next));
- }
- }
- }
-
- /**
- * Insert the method's description here. Creation date: (12/13/2000 9:14:26 PM)
- *
- * @param aRefObject
- * org.eclipse.emf.ecore.EObject
- */
- public EtoolsCopyUtility() {
- }
-
- /**
- * Create a <code>DeferredManyReferenceCopyAction</code> and add it to the list of deferred
- * copy actions.
- */
- protected void addDeferredManyReferenceCopy(EReference reference, List aValue, String idSuffix, EObject aCopyContainer) {
- getDeferredReferenceCopies().add(new DeferredManyReferenceCopyAction(reference, aValue, idSuffix, aCopyContainer));
- }
-
- /**
- * Create a <code>DeferredSingleReferenceCopyAction</code> and add it to the list of deferred
- * copy actions.
- */
- protected void addDeferredSingleReferenceCopy(EReference reference, EObject aValue, String idSuffix, EObject aCopyContainer) {
- getDeferredReferenceCopies().add(new DeferredSingleReferenceCopyAction(reference, aValue, idSuffix, aCopyContainer));
- }
-
- /**
- * Check for an already copied object first.
- */
- protected EObject containmentCopy(EObject anObject, String idSuffix) {
- EObject copied = getCopy(anObject);
- if (copied == null)
- copied = primCopy(anObject, idSuffix);
- return copied;
- }
-
- /**
- * Check for an already copied object first.
- */
- protected EObject containmentCopyObject(EObject anObject, String idSuffix) {
- EObject copied = getCopy(anObject);
- if (copied == null)
- copied = primCopyObject(anObject, idSuffix);
- return copied;
- }
-
- protected Resource containmentCopy(Resource aResource, String newUri) {
- /* copied resources are never cached */
- return primCopy(aResource, newUri);
- }
-
- /**
- * Copy all Resources and RefObjects within <code>aGroup</code> and add them to
- * <code>aGroup</code>. Non composite references will be deferred until all objects are
- * copied from <code>aGroup</code>.
- *
- * Copy Resources first and then copy RefObjects.
- */
- public void copy(CopyGroup aGroup) {
- if (aGroup != null) {
- EtoolsCopySession session = new EtoolsCopySession(this);
- session.setPreserveIds(aGroup.getPreserveIds());
- session.copy(aGroup);
- session.flush();
- }
- }
-
- public EObject copy(EObject aRefObject) {
- return copy(aRefObject, null);
- }
-
- /**
- * This method should be used if you are only going to copy <code>aRefObject</code> in this
- * copy execution.
- */
- public EObject copy(EObject aRefObject, String idSuffix) {
- EtoolsCopySession session = new EtoolsCopySession(this);
- EObject copied = session.copy(aRefObject, idSuffix);
- session.flush();
- return copied;
- }
-
- /**
- * This method should be used if you are only going to copy <code>aRefObject</code> in this
- * copy execution. This method only copies <code>aRefObject</code> with its properties, not
- * references.
- */
- public EObject copyObject(EObject aRefObject, String idSuffix) {
- EtoolsCopySession session = new EtoolsCopySession(this);
- EObject copied = session.copyObject(aRefObject, idSuffix);
- session.flush();
- return copied;
- }
-
- /**
- * This method should be used if you are only going to copy <code>aResource</code> in this
- * copy execution. The copied Resource will have a URI equal to <code>newUri</code>.
- */
- public Resource copy(Resource aResource, String newUri) {
- EtoolsCopySession session = new EtoolsCopySession(this);
- Resource copied = session.copy(aResource, newUri);
- session.flush();
- return copied;
- }
-
- /**
- * If an attribute is set and its value is not <code>null</code>, then perform copy
- * <code>attribute</code> value from <code>aRefObject</code> to <code>copyRef</code>.
- * Null is a valid value if the attribute is set.
- */
-
- protected void copyAttribute(EAttribute attribute, EObject aRefObject, String idSuffix, EObject copyRef) {
- if (!attribute.isChangeable())
- return; //ignore
- if (attribute.isMany()) {
- List value = (List) aRefObject.eGet(attribute);
- if (value != null)
- copyManyAttribute(attribute, value, aRefObject, idSuffix, copyRef);
- } else if (aRefObject.eIsSet(attribute)) {
- Object value = aRefObject.eGet(attribute);
- if (value == null)
- copyRef.eSet(attribute, value);
- else
- copySingleAttribute(attribute, value, aRefObject, idSuffix, copyRef);
- } else if (attribute == METAENAME) {
- //set name to the ID (this is computed as a default), only get here if isSetName is
- // false.
- copyRef.eSet(attribute, aRefObject.eGet(attribute));
- }
- }
-
- /**
- * Iterate over the attributes of the receiver and copy each attribute.
- */
- protected void copyCurrentAttributes(EObject aRefObject, String idSuffix, EObject copyRef) {
- List attributes = aRefObject.eClass().getEAllAttributes();
- if (attributes != null) {
- Iterator it = attributes.iterator();
- EAttribute ra;
- while (it.hasNext()) {
- ra = (EAttribute) it.next();
- copyAttribute(ra, aRefObject, idSuffix, copyRef);
- }
- }
- }
-
- /**
- * This method will iterate over the references of the receiver. If a reference's value is not
- * <code>null</code>, then a series of tests are done before setting the value with the
- * copied object, <code>copyRef</code>.
- *
- * Tests: 1. Do nothing if the reference equals the metaEContainer or metaEContains references.
- */
-
- protected void copyCurrentReferences(EObject aRefObject, String idSuffix, EObject copyRef) {
- List references = aRefObject.eClass().getEAllReferences();
- if (references != null) {
- Iterator it = references.iterator();
- EReference rr;
- while (it.hasNext()) {
- rr = (EReference) it.next();
- if (shouldCopyReference(rr))
- copyReference(rr, aRefObject, idSuffix, copyRef);
- }
- }
- }
-
- /**
- * Iterate over <code>anExtent</code> and copy each element to <code>copyExtent</code>.
- */
- protected void copyExtent(EList anExtent, EList copyExtent) {
- Iterator it = anExtent.iterator();
- EObject refObject;
- while (it.hasNext()) {
- refObject = (EObject) it.next();
- copyExtent.add(containmentCopy(refObject, null));
- }
- }
-
- /**
- * Copy a many value attribute which is treated as a many valued reference.
- *
- * Tests:
- *
- * 1. If the type is <bold>not </bold> <code>null</code>, then set the value on
- * <code>copyRef</code> without making a copy. 2. If the type is <code>null</code>, then
- * obtain the list from <code>copyRef</code> and add a copy of each value from the original
- * list to it.
- */
-
- protected void copyManyAttribute(EAttribute attribute, List aValue, EObject aRefObject, String idSuffix, EObject copyRef) {
- if (attribute.getEType() == null)
- copyRef.eSet(attribute, aValue);
- else {
- List copyList = (List) copyRef.eGet(attribute);
- Iterator it = aValue.iterator();
- Object next;
- while (it.hasNext()) {
- next = it.next();
- if (next instanceof EObject)
- copyList.add(containmentCopy((EObject) next, idSuffix));
- else
- copyList.add(next);
- }
- }
- }
-
- /**
- * This method will iterate over the references of the receiver. If a reference's value is not
- * <code>null</code>, then a series of tests are done before setting the value with the
- * copied object, <code>copyRef</code>.
- *
- * Tests: 1. If the reference is many, obtain the list from the receiving object and make a copy
- * of each value if the reference is composite before adding to the list; otherwise, just add
- * each value to the of the <code>copyRef</code>.
- */
-
- protected void copyManyReference(EReference aReference, List aList, EObject aRefObject, String idSuffix, EObject copyRef) {
- if (!aList.isEmpty()) {
- if (aReference.isContainment()) {
- List copyList = (List) copyRef.eGet(aReference);
- Iterator it = aList.iterator();
- EObject targetValue;
- while (it.hasNext()) {
- targetValue = (EObject) it.next();
- copyList.add(containmentCopy(targetValue, idSuffix));
- }
- } else
- addDeferredManyReferenceCopy(aReference, aList, idSuffix, copyRef);
- }
- }
-
- /**
- * This method will iterate over the references of the receiver. If a reference's value is not
- * <code>null</code>, then perform the copy.
- */
-
- protected void copyReference(EReference aReference, EObject aRefObject, String idSuffix, EObject copyRef) {
- if (aReference.isMany()) {
- List value = (List) aRefObject.eGet(aReference);
- if (value != null)
- copyManyReference(aReference, value, aRefObject, idSuffix, copyRef);
- } else if (aRefObject.eIsSet(aReference)) {
- Object value = aRefObject.eGet(aReference);
- copySingleReference(aReference, (EObject) value, aRefObject, idSuffix, copyRef);
- }
- }
-
- /**
- * Copy all RefObjects from <code>aGroup</code> and add the copy back to <code>aGroup</code>.
- */
- protected void copyRefObjects(CopyGroup aGroup) {
- Association association;
- EObject refObject;
- String idSuffix;
- if (aGroup.primGetRefObjects() != null) {
- Iterator it = aGroup.primGetRefObjects().iterator();
- while (it.hasNext()) {
- association = (Association) it.next();
- refObject = (EObject) association.getKey();
- idSuffix = (String) association.getValue();
- if (idSuffix == null)
- idSuffix = aGroup.getDefaultIdSuffix();
- aGroup.addCopied(containmentCopy(refObject, idSuffix));
- }
- }
- }
-
- /**
- * Copy all Resources from <code>aGroup</code> and add the copy back to <code>aGroup</code>.
- */
- protected void copyResources(CopyGroup aGroup) {
- Association association;
- Resource resource;
- String uri;
- if (aGroup.primGetResources() != null) {
- Iterator it = aGroup.primGetResources().iterator();
- while (it.hasNext()) {
- association = (Association) it.next();
- resource = (Resource) association.getKey();
- uri = (String) association.getValue();
- Resource copied = containmentCopy(resource, uri);
- copyModificationFlag(resource, copied);
- aGroup.addCopied(copied);
- }
- }
- }
-
- /**
- * Copy a single value attribute.
- *
- * Tests:
- *
- * 1. If an attribute type is not <code>null</code> then it is an object type and it must be
- * copied. Do not copy the value if the attribute is an Enumeration type. 2. If an attribute
- * type is <bold>not </bold> <code>null</code> then copy the value before setting it on
- * <code>copyRef</code>.
- */
-
- protected void copySingleAttribute(EAttribute attribute, Object aValue, EObject aRefObject, String idSuffix, EObject copyRef) {
- if (attribute.getEType() == null) {
- copyRef.eSet(attribute, aValue);
- } else {
- //MOF108
- // if (attribute.isObjectType())
- if (attribute.getEType() instanceof EClass)
- copyRef.eSet(attribute, containmentCopy((EObject) aValue, idSuffix));
- else
- copyRef.eSet(attribute, aValue);
- }
- }
-
- /**
- * This method will iterate over the references of the receiver. If a reference's value is not
- * <code>null</code>, then a series of tests are done before setting the value with the
- * copied object, <code>copyRef</code>.
- *
- * Tests: 1. If the reference is <bold>not </bold> many, make a copy of the value if the
- * reference is composite before setting the value with <code>copyRef</code>; otherwise, just
- * set the value as is.
- */
-
- protected void copySingleReference(EReference aReference, EObject aValue, EObject aRefObject, String idSuffix, EObject copyRef) {
- //Exceptional case; the relationship is not the container relationship
- //And is not navigable in the other direction; go ahead and copy
- if (aValue != aRefObject.eContainer() || aReference.getEOpposite() == null) {
- if (aReference.isContainment())
- copyRef.eSet(aReference, containmentCopy(aValue, idSuffix));
- else
- addDeferredSingleReferenceCopy(aReference, aValue, idSuffix, copyRef);
- }
- }
-
- /**
- * Copy all Resources and RefObjects within <code>aGroup</code> and add them to
- * <code>aGroup</code>. Non composite references will be deferred until all objects are
- * copied from <code>aGroup</code>.
- *
- * Copy Resources first and then copy RefObjects.
- */
- public static void createCopy(CopyGroup aGroup) {
- EtoolsCopyUtility utility = new EtoolsCopyUtility();
- utility.copy(aGroup);
- }
-
- /**
- * Copies attributes
- */
- public static void createAttributeCopy(EObject aRefObject, EObject copyObject) {
- EtoolsCopyUtility utility = new EtoolsCopyUtility();
- utility.copyCurrentAttributes(aRefObject, null, copyObject);
- }
-
- /**
- * Copies all set attributes and references based on containment. Thus, it will copy the entire
- * containment tree. Use the idSuffix to define the suffix that will be appended to the existing
- * IDs of copied objects.
- */
- public static EObject createCopy(EObject aRefObject) {
- return createCopy(aRefObject, null);
- }
-
- /**
- * Copies all set attributes and references based on containment. Thus, it will copy the entire
- * containment tree. Use the idSuffix to define the suffix that will be appended to the existing
- * IDs of copied objects.
- */
- public static EObject createCopy(EObject aRefObject, String idSuffix) {
- EtoolsCopyUtility utility = new EtoolsCopyUtility();
- return utility.copy(aRefObject, idSuffix);
- }
-
- /**
- * Copy <code>aResource</code> using <code>newUri</code> for the URI.
- */
- public static Resource createCopy(Resource aResource, String newUri) {
- EtoolsCopyUtility utility = new EtoolsCopyUtility();
- return utility.copy(aResource, newUri);
- }
-
- protected void executeDeferredCopyActions() {
- if (primGetDeferredReferenceCopies() != null) {
- Iterator it = primGetDeferredReferenceCopies().iterator();
- DeferredReferenceUtilityAction action;
- while (it.hasNext()) {
- action = (DeferredReferenceUtilityAction) it.next();
- action.performAction();
- }
- primGetDeferredReferenceCopies().clear();
- }
- }
-
- /**
- * Insert the method's description here. Creation date: (12/13/2000 9:17:35 PM)
- *
- * @return java.util.HashMap
- */
- protected java.util.HashMap getCopiedObjects() {
- if (copiedObjects == null)
- copiedObjects = new HashMap(200);
- return copiedObjects;
- }
-
- protected java.util.HashMap getCopiedAdapters() {
- if (copiedAdapters == null)
- copiedAdapters = new HashMap(200);
- return copiedAdapters;
- }
-
- /**
- * Return a cached copy.
- */
- public EObject getCopy(EObject anObject) {
- if (anObject == null)
- return null;
- return (EObject) getCopiedObjects().get(anObject);
- }
-
- /**
- * Return a cached copy, if none, return the argument.
- */
- public EObject getCopyIfFound(EObject anObject) {
- EObject copied = getCopy(anObject);
- return copied == null ? anObject : copied;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/16/2000 9:11:32 AM)
- *
- * @return java.util.List
- */
- protected java.util.List getDeferredReferenceCopies() {
- if (deferredReferenceCopies == null)
- deferredReferenceCopies = new ArrayList(100);
- return deferredReferenceCopies;
- }
-
- /**
- * Return an instance of EObject that is the same type as <code>aRefObject</code>.
- */
- public EObject newInstance(EObject aRefObject) {
- if (aRefObject == null)
- return null;
- EPackage epkg = (EPackage) aRefObject.eClass().eContainer();
- EFactory factory = epkg.getEFactoryInstance();
- EClass refObj = aRefObject.eClass();
- return factory.create(refObj);
- }
-
- /**
- * Return an instance of Resource that uses the same ResourceFactory as the one used by
- * <code>aResource</code>. If <code>newUri</code> is <code>null</code> then use the URI
- * from <code>aResource</code>.
- */
- public Resource newInstance(Resource aResource, String newUri) {
- if (aResource == null)
- return null;
- Resource newResource;
- String originalUri = aResource.getURI().toString();
- newUri = newUri == null ? originalUri : newUri;
-
- Resource.Factory factory = null;
- if (aResource.getResourceSet() == null)
- factory = Resource.Factory.Registry.INSTANCE.getFactory(URI.createURI(originalUri));
- else
- factory = aResource.getResourceSet().getResourceFactoryRegistry().getFactory(URI.createURI(originalUri));
-
-
- newResource = factory.createResource(URI.createURI(newUri));
- return newResource;
- }
-
- /**
- * Should the id be copied in the case where no suffix is specified? Defaults to false
- */
- public boolean preserveIds() {
- return preserveIds;
- }
-
- /**
- * Copies all set attributes and references based on containment. Thus, it will copy the entire
- * containment tree. Use the idSuffix to define the suffix that will be appended to the existing
- * IDs of copied objects. If an idSuffix does not exist, do not set an id on the copied object.
- */
- protected EObject primCopy(EObject aRefObject, String idSuffix) {
- if (aRefObject == null)
- return null;
- EObject copyRef = primCopyObject(aRefObject, idSuffix);
-
- copyCurrentReferences(aRefObject, idSuffix, copyRef);
- return copyRef;
- }
-
- /**
- * Copies all set attributes based on containment. Thus, it will copy the entire containment
- * tree. Use the idSuffix to define the suffix that will be appended to the existing IDs of
- * copied objects. If an idSuffix does not exist, do not set an id on the copied object.
- */
- protected EObject primCopyObject(EObject aRefObject, String idSuffix) {
- if (aRefObject == null)
- return null;
- EObject copyRef = newInstance(aRefObject);
-
- recordCopy(aRefObject, copyRef);
- copyCurrentAttributes(aRefObject, idSuffix, copyRef);
- if (isCopyAdapters())
- copyAdapters(aRefObject, copyRef);
- return copyRef;
- }
-
- protected void copyAdapters(EObject aRefObject, EObject copyRef) {
- List adapters = aRefObject.eAdapters();
- for (int i = 0; i < adapters.size(); i++) {
- Adapter adapter = (Adapter) adapters.get(i);
- copyAdapter(aRefObject, copyRef, adapter);
-
- }
- }
-
- protected void copyAdapter(EObject aRefObject, EObject copyRef, Adapter adapter) {
- if (!(adapter instanceof CloneablePublic))
- return;
- CloneablePublic copyAdapter = (CloneablePublic) getCopiedAdapters().get(adapter);
- if (copyAdapter == null) {
- copyAdapter = (CloneablePublic) ((CloneablePublic) adapter).clone();
- getCopiedAdapters().put(adapter, copyAdapter);
- }
- if (copyAdapter != null)
- copyRef.eAdapters().add(copyAdapter);
- }
-
- /**
- * Copies all set attributes and references based on containment. Thus, it will copy the entire
- * containment tree. Use the idSuffix to define the suffix that will be appended to the existing
- * IDs of copied objects.
- */
- protected Resource primCopy(Resource aResource, String newUri) {
- if (aResource == null)
- return null;
- Resource copyResource = newInstance(aResource, newUri);
- copyExtent(aResource.getContents(), copyResource.getContents());
- return copyResource;
- }
-
- protected void copyModificationFlag(Resource aResource, Resource copied) {
- if (aResource.isModified())
- copied.setModified(true);
- }
-
- /**
- * Insert the method's description here. Creation date: (12/16/2000 9:11:32 AM)
- *
- * @return java.util.List
- */
- private java.util.List primGetDeferredReferenceCopies() {
- return deferredReferenceCopies;
- }
-
- public void recordCopy(EObject aSource, EObject aCopy) {
- getCopiedObjects().put(aSource, aCopy);
- }
-
- public void recordCopy(Adapter aSource, Adapter aCopy) {
- getCopiedAdapters().put(aSource, aCopy);
- }
-
- /**
- * Should the id be copied in the case where no suffix is specified?
- */
- public void setPreserveIds(boolean value) {
- preserveIds = value;
- }
-
- protected boolean shouldCopyReference(EReference aReference) {
- return aReference.isChangeable();
- }
-
- /**
- * @return
- */
- public boolean isCopyAdapters() {
- return copyAdapters;
- }
-
- /**
- * Flag used to indicate whether adapters should be copied as well. In order for an adapter to
- * be copied, it must implement the {@link CloneablePublic}interface.
- */
- public void setCopyAdapters(boolean b) {
- copyAdapters = b;
- }
-
-}
-
-
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ExceptionHelper.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ExceptionHelper.java
deleted file mode 100644
index b5fc13369..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ExceptionHelper.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.common.frameworks.internal.enablement.nonui.IWFTWrappedException;
-
-
-
-/**
- * Utility class to factor common code for implementers of IArchiveWrappedException
- */
-public class ExceptionHelper {
-
- /**
- * Utility class; cannot be instantiated
- */
- private ExceptionHelper() {
- super();
- }
-
- /**
- * Return the messages from
- *
- * @exception and
- * all nested exceptions, in order from outermost to innermost
- */
- public static java.lang.String[] getAllMessages(IWFTWrappedException exception) {
- List messages = new ArrayList(4);
- messages.add(exception.getMessage());
- Exception nested = exception.getNestedException();
- while (nested != null) {
- messages.add(nested.getMessage());
- if (nested instanceof IWFTWrappedException)
- nested = ((IWFTWrappedException) nested).getNestedException();
- else
- nested = null;
- }
- return (String[]) messages.toArray(new String[messages.size()]);
- }
-
- /**
- * Return the messages from
- *
- * @exception and
- * all nested exceptions, in order from outermost to innermost, concatenated as
- * one
- */
- public static String getConcatenatedMessages(IWFTWrappedException exception) {
- String[] messages = getAllMessages(exception);
- StringBuffer sb = new StringBuffer(256);
- for (int i = 0; i < messages.length; i++) {
- sb.append(messages[i]);
- if (i < messages.length - 1)
- sb.append('\n');
- }
- return sb.toString();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ExtendedEcoreUtil.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ExtendedEcoreUtil.java
deleted file mode 100644
index 2860b2af5..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ExtendedEcoreUtil.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import java.io.FileNotFoundException;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-
-
-
-public class ExtendedEcoreUtil extends EcoreUtil {
- private static FileNotFoundDetector FILE_NOT_FOUND_DETECTOR;
- private static String NAME_ATTRIBUTE_STRING = "name"; //$NON-NLS-1$
-
-
- public interface FileNotFoundDetector {
- boolean isFileNotFound(WrappedException wrappedEx);
- }
-
- public static void setFileNotFoundDetector(FileNotFoundDetector detector) {
- FILE_NOT_FOUND_DETECTOR = detector;
- }
-
- public static FileNotFoundDetector getFileNotFoundDetector() {
- if (FILE_NOT_FOUND_DETECTOR == null) {
- FILE_NOT_FOUND_DETECTOR = new FileNotFoundDetector() {
- public boolean isFileNotFound(WrappedException wrappedEx) {
- if (getInnerFileNotFoundException(wrappedEx) != null)
- return true;
- return false;
- }
- };
- }
- return FILE_NOT_FOUND_DETECTOR;
- }
-
- public static FileNotFoundException getInnerFileNotFoundException(WrappedException wrappedEx) {
- if (wrappedEx.exception() instanceof java.io.FileNotFoundException) {
- return (FileNotFoundException) wrappedEx.exception();
- } else if (wrappedEx.exception() instanceof WrappedException) {
- return getInnerFileNotFoundException((WrappedException) wrappedEx.exception());
- }
- return null;
- }
-
- public static void eSetOrAdd(EObject obj, EStructuralFeature feature, Object value) {
- eSetOrAdd(obj, feature, value, 0);
- }
-
- public static void eSetOrAdd(EObject obj, EStructuralFeature feature, Object value, int newIndex) {
- if (feature.isMany() && value != null) {
- if (newIndex >= 0)
- ((List) obj.eGet(feature)).add(newIndex, value);
- else
- ((List) obj.eGet(feature)).add(value);
- } else {
- obj.eSet(feature, value);
- }
- }
-
- public static void eUnsetOrRemove(EObject obj, EStructuralFeature feature, Object value) {
- if (feature == null || feature.isMany())
- ((List) obj.eGet(feature)).remove(value);
- else
- obj.eUnset(feature);
- }
-
- public static boolean endsWith(URI sourceUri, URI testUri) {
- //TODO Waiting on new emf URI API
- String[] sourceSegments = sourceUri.segments();
- String[] testSegments = testUri.segments();
- int i = testSegments.length;
- int j = sourceSegments.length;
- if (j >= i) {
- boolean test = true;
-
- while (test && i > 0) {
- i--;
- j--;
- test = testSegments[i].equals(sourceSegments[j]);
- }
- return test;
- }
- return false;
- }
-
- public static String getName(EObject obj) {
- if (obj == null)
- return null;
- if (obj instanceof ENamedElement)
- return ((ENamedElement) obj).getName();
- List allAtts = obj.eClass().getEAllAttributes();
- int size = allAtts.size();
- EAttribute att, nameAttribute = null;
- for (int i = 0; i < size; i++) {
- att = (EAttribute) allAtts.get(i);
- if (NAME_ATTRIBUTE_STRING.equals(att.getName())) {
- nameAttribute = att;
- break;
- }
- }
- if (nameAttribute != null)
- return (String) obj.eGet(nameAttribute);
- return null;
- }
-
- public static void addLoadingTag(Resource resource) {
- resource.eAdapters().add(IsLoadingDetector.INSTANCE);
- }
-
- public static void removeLoadingTag(Resource resource) {
- resource.eAdapters().remove(IsLoadingDetector.INSTANCE);
- }
-
- /**
- * Return true if the resource is currently being loaded. This is determined by checking for the
- * IsLoadingDector in the list of eAdapters on the resource.
- *
- * @param resource
- * @return boolean
- *
- * @see addLoadingTag(Resource)
- * @see removeLoadingTag(Resource)
- *
- */
- public static boolean isLoading(Resource resource) {
- if (resource != null) {
- return resource.eAdapters().contains(IsLoadingDetector.INSTANCE);
- }
- return false;
- }
-
- public static Adapter createAdapterForLoading(Adapter targetAdapter, EObject targetObject) {
- Resource res = targetObject.eResource();
- if (res == null || isLoading(res))
- return new IsLoadingProxyAdapter(targetAdapter, targetObject);
- return targetAdapter;
- }
-
- public static void preRegisterPackage(String nsPrefix, EPackage.Descriptor descriptor) {
- if (!EPackage.Registry.INSTANCE.containsKey(nsPrefix))
- EPackage.Registry.INSTANCE.put(nsPrefix, descriptor);
- }
- /**
- * Returns the adapter of the specified type.
- * @param anObject
- * @param adapters list of adapters to search.
- * @param type the type of adapter.
- * @return an adapter from the list or null.
- */
- public static Adapter getAdapter(EObject anObject, List adapters, Object type) {
-
- synchronized (adapters) {
-
- for (int i = 0, size = adapters.size(); i < size; ++i) {
- Adapter adapter = (Adapter) adapters.get(i);
- if (adapter.isAdapterForType(type)) {
- return adapter;
- }
- }
- return null;
- }
- }
-
- /**
- * Remove this object from it's container, and make it and all it's children
- * proxies
- */
- public static void unload(EObject root) {
- Resource res = root.eResource();
- EObject container = root.eContainer();
- /* Making sure the proxy is created first before unloading */
- if (root != null && res != null)
- becomeProxy(root, res);
- if (container == null)
- if (res != null)
- res.getContents().remove(root);
- else {
- EStructuralFeature feature = root.eContainmentFeature();
- if (feature != null)
- eUnsetOrRemove(container, feature, root);
- }
-
- }
-
- /**
- * Turns this object and all it's children to proxies, and removes adapters precondition: The
- * object has been removed from it's container
- */
- public static void becomeProxy(EObject root, Resource res) {
- Iterator iter = root.eAllContents();
- while (iter.hasNext()) {
- doBecomeProxy((InternalEObject) iter.next(), res);
- }
- doBecomeProxy((InternalEObject) root, res);
- }
-
- protected static void doBecomeProxy(InternalEObject p, Resource res) {
- String id = res.getURIFragment(p);
- p.eSetProxyURI(res.getURI().appendFragment(id));
- if (res instanceof XMLResource) {
- ((XMLResource) res).setID(p,null);
- }
- p.eAdapters().clear();
- }
-
- public static void removeProxy(EObject root, Resource res) {
- Iterator iter = root.eAllContents();
- while (iter.hasNext()) {
- doRemoveProxy((InternalEObject) iter.next(), res);
- }
- doRemoveProxy((InternalEObject) root, res);
- }
-
- protected static void doRemoveProxy(InternalEObject p, Resource res) {
- String id = p.eProxyURI().fragment();
- if (res instanceof XMLResource) {
- ((XMLResource) res).setID(p, id);
- }
- p.eSetProxyURI(null);
- }
-
-
- /**
- * Ensures the passed object is not a proxy; if it is, throws an exception indicating the bad
- * HREF. If the object is null, does nothing.
- *
- * @param object
- * @throws DanglingHREFException
- */
- public static void checkProxy(EObject object) throws DanglingHREFException {
- if (object == null || !object.eIsProxy())
- return;
- String msg = WFTUtilsResourceHandler.getString(WFTUtilsResourceHandler.DANGLING_HREF_ERROR_, new Object[]{((InternalEObject) object).eProxyURI()}); //$NON-NLS-1$
- throw new DanglingHREFException(msg);
- }
-
- /**
- * Return true if o1 and o2 are not the same values. This implementation takes into account that
- * either parameter can be null.
- *
- * @param o1
- * @param o2
- * @return
- */
- public static boolean valueChanged(Object o1, Object o2) {
- return (o1 == null ^ o2 == null) || (o1 == null || !o1.equals(o2));
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/FeatureValueConversionException.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/FeatureValueConversionException.java
deleted file mode 100644
index 0525a1f44..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/FeatureValueConversionException.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-public class FeatureValueConversionException extends RuntimeException {
-
- /**
- * Constructor for FeatureValueConversionException.
- */
- public FeatureValueConversionException() {
- super();
- }
-
- /**
- * Constructor for FeatureValueConversionException.
- *
- * @param s
- */
- public FeatureValueConversionException(String s) {
- super(s);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/FeatureValueConverter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/FeatureValueConverter.java
deleted file mode 100644
index 786a68748..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/FeatureValueConverter.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * Insert the type's description here. Creation date: (5/10/2001 2:46:54 PM)
- *
- * @author: Administrator
- */
-public interface FeatureValueConverter {
- static final FeatureValueConverter DEFAULT = new DefaultFeatureValueConverter();
-
- /**
- * Convert
- *
- * @aValue to the type of
- * @aFeature.
- */
- Object convertValue(Object aValue, EStructuralFeature aFeature);
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ICommand.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ICommand.java
deleted file mode 100644
index d04099588..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ICommand.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * @author John Mourra
- */
-public interface ICommand {
-
- /*
- * This will contain the multi-selection of objects to deploy. This selection could be used to
- * filter elements within a Module. Any other setup code should be done here...
- */
- void init(Object[] selection);
-
- /**
- * @param resource
- * @param delta
- * @param context
- * @return
- * @throws CoreException
- */
- public boolean execute(IResource resource, IResourceDelta delta, ICommandContext context) throws CoreException;
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ICommandContext.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ICommandContext.java
deleted file mode 100644
index bee3f613c..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ICommandContext.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-/**
- * @author John Mourra
- */
-public interface ICommandContext {
-
- /**
- * @return
- */
- public IProgressMonitor getProgressMonitor();
-
- /**
- * @return
- */
- public Map getConfigurationProperties();
-
- /**
- * @return
- */
- public ResourceSet getResourceSet();
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/IDUtil.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/IDUtil.java
deleted file mode 100644
index 374ae1327..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/IDUtil.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-
-public class IDUtil {
-
- /**
- * This method is invoked to assign a unique ID to the object. The object must be contained in a
- * resource.
- */
- public static void assignID(EObject object) {
- Resource aResource = object.eResource();
- if (aResource instanceof XMLResource)
- assignID(object, (XMLResource) aResource);
-
- }
-
- public static String getOrAssignID(EObject object) {
- Resource aResource = object.eResource();
- if (aResource instanceof XMLResource)
- return getOrAssignID(object, (XMLResource) aResource);
- return null;
- }
-
- public static String getOrAssignID(EObject object, XMLResource aResource) {
- String id = aResource.getID(object);
- if (id == null)
- return assignID(object, aResource);
- return id;
- }
-
- public static String assignID(EObject object, XMLResource aResource) {
- String name = getBaseIDForAssignment(object);
- if (name == null)
- return null;
- String id = ensureUniqueID(aResource, name);
- aResource.setID(object, id);
- return id;
- }
-
- protected static String ensureUniqueID(XMLResource aResource, String baseIDName) {
- baseIDName += "_"; //$NON-NLS-1$
- //Change to use the current time instead of incremental numbers to help
- //support team development.
- long currentTime = System.currentTimeMillis();
- String id = baseIDName + currentTime;
- while (aResource.getEObject(id) != null) {
- ++currentTime;
- id = baseIDName + currentTime;
- }
- return id;
- }
-
- protected static String getBaseIDForAssignment(EObject object) {
- EClass metaO = object.eClass();
- return metaO.getName();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/InvalidPasswordCipherException.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/InvalidPasswordCipherException.java
deleted file mode 100644
index 5ff513be3..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/InvalidPasswordCipherException.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-import org.omg.CORBA.UserException;
-
-public class InvalidPasswordCipherException extends UserException {
-}
-
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/InvalidPasswordDecodingException.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/InvalidPasswordDecodingException.java
deleted file mode 100644
index 2e1680819..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/InvalidPasswordDecodingException.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-import org.omg.CORBA.UserException;
-
-public class InvalidPasswordDecodingException extends UserException {
-}
-
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/InvalidPasswordEncodingException.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/InvalidPasswordEncodingException.java
deleted file mode 100644
index dd882d7d8..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/InvalidPasswordEncodingException.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-import org.omg.CORBA.UserException;
-
-public class InvalidPasswordEncodingException extends UserException {
-}
-
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/IsLoadingDetector.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/IsLoadingDetector.java
deleted file mode 100644
index d7d114c12..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/IsLoadingDetector.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-/*
- * Created on Apr 1, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code Generation>Code
- * and Comments
- */
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-
-
-public class IsLoadingDetector implements Adapter {
- public static final IsLoadingDetector INSTANCE = new IsLoadingDetector();
-
- private IsLoadingDetector() {
- }
-
- public void notifyChanged(Notification notification) {
- }
-
- public Notifier getTarget() {
- return null;
- }
-
- public void setTarget(Notifier newTarget) {
- }
-
- public boolean isAdapterForType(Object type) {
- return type == this;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/IsLoadingProxyAdapter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/IsLoadingProxyAdapter.java
deleted file mode 100644
index d90669bd8..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/IsLoadingProxyAdapter.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 1, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-
-/**
- * @author DABERG
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class IsLoadingProxyAdapter extends AdapterImpl {
- private Resource resource;
- private Adapter targetAdapter;
- private EObject targetObject;
-
- public IsLoadingProxyAdapter(Adapter aTargetAdapter, EObject aTargetObject) {
- targetAdapter = aTargetAdapter;
- targetObject = aTargetObject;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- public void notifyChanged(Notification msg) {
- if (resource != null) {
- //listen for the remove of the loading adapter
- if (msg.getFeatureID(null) == Resource.RESOURCE__IS_LOADED && msg.getEventType() == Notification.SET) {
- removeProxySupport();
- reset();
- }
- } else if (cacheResource()) {
- targetAdapter.notifyChanged(msg);
- reset();
- }
- }
-
- /**
- * Cache the resource variable and return true if we removed the proxy support.
- */
- private boolean cacheResource() {
- if (getTarget() != null) {
- EObject eObj = (EObject) getTarget();
- resource = eObj.eResource();
- if (resource != null) {
- eObj.eAdapters().remove(this);
- if (ExtendedEcoreUtil.isLoading(resource))
- resource.eAdapters().add(this);
- else {
- targetObject.eAdapters().add(targetAdapter);
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- *
- */
- private void removeProxySupport() {
- getTarget().eAdapters().remove(this);
- targetObject.eAdapters().add(targetAdapter);
- }
-
- private void reset() {
- resource = null;
- targetAdapter = null;
- targetObject = null;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Namespace.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Namespace.java
deleted file mode 100644
index 1a4a736b3..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Namespace.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-/*
- * Created on Aug 20, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-public class Namespace {
-
- protected String prefix;
- protected String nsURI;
-
-
- public Namespace(String prefix, String uri) {
- this.prefix = prefix;
- this.nsURI = uri;
- }
-
- public String getNsURI() {
- return nsURI;
- }
-
- public String getPrefix() {
- return prefix;
- }
-
- public void setNsURI(String string) {
- nsURI = string;
- }
-
- public void setPrefix(String string) {
- prefix = string;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/NamespaceAdapter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/NamespaceAdapter.java
deleted file mode 100644
index a21a01607..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/NamespaceAdapter.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Aug 20, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.common.notify.impl.NotificationImpl;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.EStructuralFeatureImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-
-/**
- * Internal class used to hold namespaces parsed from an XML file using the xmlns:prefix="aURI"
- * syntax
- */
-public class NamespaceAdapter extends AdapterImpl implements CloneablePublic {
-
- protected final static String ADAPTER_TYPE = NamespaceAdapter.class.getName();
- protected Map prefixesToNS;
- protected List namespaces;
-
- public final static EStructuralFeature NOTIFICATION_FEATURE = new EStructuralFeatureImpl() {
- };
-
- private static class Notification extends NotificationImpl {
-
- /**
- * @param eventType
- * @param oldValue
- * @param newValue
- */
- public Notification(int eventType, Object oldValue, Object newValue) {
- super(eventType, oldValue, newValue);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.notify.impl.NotificationImpl#getFeature()
- */
- public Object getFeature() {
- return NOTIFICATION_FEATURE;
- }
- }
-
- protected NamespaceAdapter() {
- super();
- }
-
- public static void addNamespace(String prefix, String uri, EObject obj) {
- if (obj == null)
- return;
- NamespaceAdapter adapter = getAdapter(obj);
- if (adapter != null)
- adapter.addNamespace(prefix, uri);
- }
-
- public static void removeNamespace(String prefix, EObject obj) {
- if (obj == null)
- return;
- NamespaceAdapter adapter = retrieveExistingAdapter(obj);
- if (adapter != null)
- adapter.removeNamespace(prefix);
- }
-
- /**
- * Facade method for resolving prefixes to an actual namespace URI. Used for objects contained
- * by instances of {@link com.ibm.etools.emf2xml.TranslatorResource}. Walks up the object
- * containment path until a namespace is found, or returns null.
- */
- public static String getResolvedNamespaceURI(String prefix, EObject obj) {
- if (prefix == null || obj == null)
- return null;
- EObject container = obj;
- String nsURI;
- while (container != null) {
- nsURI = getNamespaceURIAtThisLevel(prefix, container);
- if (nsURI != null)
- return nsURI;
- container = container.eContainer();
- }
- return null;
- }
-
- public static String getNamespaceURIAtThisLevel(String prefix, EObject obj) {
- if (obj == null)
- return null;
- NamespaceAdapter adapter = retrieveExistingAdapter(obj);
- return adapter == null ? null : adapter.getNamespaceURI(prefix);
- }
-
- public static List getNamespaces(EObject obj) {
- if (obj == null)
- return Collections.EMPTY_LIST;
- NamespaceAdapter adapter = retrieveExistingAdapter(obj);
- return adapter == null ? null : adapter.getNamespaces();
-
- }
-
- protected static NamespaceAdapter retrieveExistingAdapter(EObject obj) {
- return (NamespaceAdapter) EcoreUtil.getExistingAdapter(obj, ADAPTER_TYPE);
- }
-
- protected static NamespaceAdapter getAdapter(EObject obj) {
- NamespaceAdapter adapter = retrieveExistingAdapter(obj);
- return adapter == null ? createAdapter(obj) : adapter;
- }
-
- protected static NamespaceAdapter createAdapter(EObject obj) {
- NamespaceAdapter adapter = new NamespaceAdapter();
- adapter.setTarget(obj);
- obj.eAdapters().add(adapter);
- return adapter;
- }
-
- protected void addNamespace(String prefix, String uri) {
- Namespace ns = new Namespace(prefix, uri);
- if (namespaces == null)
- namespaces = new ArrayList();
- if (prefixesToNS == null)
- prefixesToNS = new HashMap();
-
- prefixesToNS.put(prefix, ns);
- namespaces.add(ns);
- fireNotification(org.eclipse.emf.common.notify.Notification.ADD, null, ns);
-
- }
-
- protected void removeNamespace(String prefix) {
- Namespace ns = null;
- if (prefixesToNS != null)
- ns = (Namespace) prefixesToNS.get(prefix);
-
- if (ns != null)
- namespaces.remove(ns);
- fireNotification(org.eclipse.emf.common.notify.Notification.REMOVE, ns, null);
- }
-
- protected String getNamespaceURI(String prefix) {
- if (prefixesToNS == null)
- return null;
- Namespace ns = (Namespace) prefixesToNS.get(prefix);
- if (ns != null)
- return ns.getNsURI();
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.notify.impl.AdapterImpl#isAdapterForType(java.lang.Object)
- */
- public boolean isAdapterForType(Object type) {
- return ADAPTER_TYPE.equals(type);
- }
-
- public List getNamespaces() {
- return namespaces == null ? Collections.EMPTY_LIST : Collections.unmodifiableList(namespaces);
- }
-
- protected void fireNotification(int type, Object oldValue, Object newValue) {
- if (target != null)
- target.eNotify(new Notification(type, oldValue, newValue));
- }
-
- public boolean hasNamespaces() {
- return namespaces != null && !namespaces.isEmpty();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf.ecore.utilities.CloneablePublic#clone()
- */
- public Object clone() {
- NamespaceAdapter result = new NamespaceAdapter();
- if (hasNamespaces()) {
- for (int i = 0; i < namespaces.size(); i++) {
- Namespace ns = (Namespace) namespaces.get(i);
- result.addNamespace(ns.getPrefix(), ns.getNsURI());
- }
- }
- return result;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PassthruEncoderDecoder.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PassthruEncoderDecoder.java
deleted file mode 100644
index e6840594f..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PassthruEncoderDecoder.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-/**
- * A passthru EncoderDecoder implementation
- */
-public class PassthruEncoderDecoder extends EncoderDecoderAdapter implements EncoderDecoder {
- public static final PassthruEncoderDecoder INSTANCE = new PassthruEncoderDecoder();
- public static final String KEY = PassthruEncoderDecoder.class.getName();
-
- /**
- * EncoderDecoderAdapter constructor comment.
- */
- private PassthruEncoderDecoder() {
- super();
- }
-
- /**
- * Returns a decoded version of the value.
- */
- public String decode(String value) {
- return value;
- }
-
- /**
- * Returns an encoded version of the value.
- */
- public String encode(String value) {
- return value;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PasswordCipherUtil.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PasswordCipherUtil.java
deleted file mode 100644
index f2371587d..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PasswordCipherUtil.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-public class PasswordCipherUtil {
- private static final String DEFAULT_SUPPORTED_CRYPTO_ALGORITHMS[] = {"xor"}; //$NON-NLS-1$
- private static String _supported_crypto_algorithms[];
-
- public PasswordCipherUtil() {
- }
-
- public static byte[] decipher(byte abyte0[], String s) throws InvalidPasswordCipherException, UnsupportedCryptoAlgorithmException {
- if (s == null)
- throw new UnsupportedCryptoAlgorithmException();
- byte abyte1[] = null;
- if (s.equalsIgnoreCase(DEFAULT_SUPPORTED_CRYPTO_ALGORITHMS[0]))
- abyte1 = xor(abyte0);
- else
- throw new UnsupportedCryptoAlgorithmException();
-
- if (abyte1 == null)
- throw new InvalidPasswordCipherException();
-
- return abyte1;
- }
-
- public static byte[] encipher(byte abyte0[], String s) throws InvalidPasswordCipherException, UnsupportedCryptoAlgorithmException {
- if (s == null)
- throw new UnsupportedCryptoAlgorithmException();
- byte abyte1[] = null;
- if (s.equalsIgnoreCase(DEFAULT_SUPPORTED_CRYPTO_ALGORITHMS[0]))
- abyte1 = xor(abyte0);
- else
- throw new UnsupportedCryptoAlgorithmException();
-
- if (abyte1 == null)
- throw new InvalidPasswordCipherException();
- return abyte1;
- }
-
- public static String[] getSupportedCryptoAlgorithms() {
- return _supported_crypto_algorithms;
- }
-
- private static byte[] xor(byte abyte0[]) {
- byte abyte1[] = null;
- if (abyte0 != null) {
- abyte1 = new byte[abyte0.length];
- for (int i = 0; i < abyte0.length; i++)
- abyte1[i] = (byte) (0x5f ^ abyte0[i]);
- }
- return abyte1;
- }
-
- static {
- _supported_crypto_algorithms = null;
- if (_supported_crypto_algorithms == null)
- _supported_crypto_algorithms = DEFAULT_SUPPORTED_CRYPTO_ALGORITHMS;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PasswordEncoderDecoder.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PasswordEncoderDecoder.java
deleted file mode 100644
index 2c82cedf2..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PasswordEncoderDecoder.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-public class PasswordEncoderDecoder extends EncoderDecoderAdapter implements EncoderDecoder {
- public static final String KEY = "password-security-coder"; //$NON-NLS-1$
-
- public PasswordEncoderDecoder() {
- }
-
- public String decode(String s) {
- return PasswordUtil.passwordDecode(s);
- }
-
- public String encode(String s) {
- return PasswordUtil.passwordEncode(s);
- }
-
- public Object getKey() {
- return KEY;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PasswordUtil.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PasswordUtil.java
deleted file mode 100644
index 012f2c2f1..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PasswordUtil.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-import java.io.UnsupportedEncodingException;
-
-public class PasswordUtil {
- public static final String STRING_CONVERSION_CODE = "UTF8"; //$NON-NLS-1$
- public static final String EMPTY_STRING = ""; //$NON-NLS-1$
- public static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
- public static final String DEFAULT_CRYPTO_ALGORITHM;
- private static final String SUPPORTED_CRYPTO_ALGORITHMS[];
- private static final byte BASE64_ENCODE_MAP[];
- private static final byte BASE64_DECODE_MAP[];
-
- public PasswordUtil() {
- }
-
- public static String decode(String s) throws InvalidPasswordDecodingException, UnsupportedCryptoAlgorithmException {
- if (s == null)
- throw new InvalidPasswordDecodingException();
- String s1 = getCryptoAlgorithm(s);
- if (s1 == null)
- throw new InvalidPasswordDecodingException();
-
- if (!isValidCryptoAlgorithm(s1))
- throw new UnsupportedCryptoAlgorithmException();
-
- String s2 = decode_password(removeCryptoAlgorithmTag(s), s1);
- if (s2 == null)
- throw new InvalidPasswordDecodingException();
- return s2;
- }
-
- public static String encode(String s) throws InvalidPasswordEncodingException, UnsupportedCryptoAlgorithmException {
- return encode(s, DEFAULT_CRYPTO_ALGORITHM);
- }
-
- public static String encode(String s, String s1) throws InvalidPasswordEncodingException, UnsupportedCryptoAlgorithmException {
- if (!isValidCryptoAlgorithm(s1))
- throw new UnsupportedCryptoAlgorithmException();
- if (s == null)
- throw new InvalidPasswordEncodingException();
-
- if (getCryptoAlgorithm(s) != null)
- throw new InvalidPasswordEncodingException();
-
- String s2 = encode_password(s.trim(), s1.trim());
- if (s2 == null)
- throw new InvalidPasswordEncodingException();
- return s2;
- }
-
- public static String getCryptoAlgorithm(String s) {
- String s1 = null;
- if (s != null) {
- s = s.trim();
- if (s.length() >= 2) {
- int i = s.indexOf("{"); //$NON-NLS-1$
- if (i == 0) {
- int j = s.indexOf("}", ++i); //$NON-NLS-1$
- if (j > 0)
- if (i < j)
- s1 = s.substring(i, j).trim();
- else
- s1 = EMPTY_STRING;
- }
- }
- }
- return s1;
- }
-
- public static String getCryptoAlgorithmTag(String s) {
- String s1 = null;
- String s2 = getCryptoAlgorithm(s);
- if (s2 != null) {
- StringBuffer stringbuffer = new StringBuffer("{"); //$NON-NLS-1$
- if (s2.length() > 0)
- stringbuffer.append(s2);
- stringbuffer.append("}"); //$NON-NLS-1$
- s1 = stringbuffer.toString();
- }
- return s1;
- }
-
- public static boolean isValidCryptoAlgorithm(String s) {
- if (s != null) {
- s = s.trim();
- if (s.length() == 0)
- return true;
- for (int i = 0; i < SUPPORTED_CRYPTO_ALGORITHMS.length; i++)
- if (s.equalsIgnoreCase(SUPPORTED_CRYPTO_ALGORITHMS[i]))
- return true;
- }
- return false;
- }
-
- public static boolean isValidCryptoAlgorithmTag(String s) {
- return isValidCryptoAlgorithm(getCryptoAlgorithm(s));
- }
-
- public static String passwordDecode(String s) {
- if (s == null)
- return null;
- String s1 = getCryptoAlgorithm(s);
- if (s1 == null)
- return s;
- if (!isValidCryptoAlgorithm(s1))
- return null;
- return decode_password(removeCryptoAlgorithmTag(s), s1);
- }
-
- public static String passwordEncode(String s) {
- return passwordEncode(s, DEFAULT_CRYPTO_ALGORITHM);
- }
-
- public static String passwordEncode(String s, String s1) {
- if (!isValidCryptoAlgorithm(s1))
- return null;
- if (s == null)
- return null;
- String s2 = getCryptoAlgorithm(s);
- if (s2 != null) {
- if (s2.equalsIgnoreCase(s1.trim()))
- return s.trim();
- return null;
- }
- return encode_password(s.trim(), s1.trim());
- }
-
- public static String removeCryptoAlgorithmTag(String s) {
- String s1 = null;
- if (s != null) {
- s = s.trim();
- if (s.length() >= 2) {
- int i = s.indexOf("{"); //$NON-NLS-1$
- if (i == 0) {
- int j = s.indexOf("}", ++i); //$NON-NLS-1$
- if (j > 0)
- if (++j < s.length())
- s1 = s.substring(j).trim();
- else
- s1 = EMPTY_STRING;
- }
- }
- }
- return s1;
- }
-
- private static byte[] convert_to_bytes(String s) {
- byte abyte0[] = null;
- if (s != null)
- if (s.length() == 0)
- abyte0 = EMPTY_BYTE_ARRAY;
- else
- try {
- abyte0 = s.getBytes(STRING_CONVERSION_CODE);
- } catch (UnsupportedEncodingException unsupportedencodingexception) {
- abyte0 = null;
- }
- return abyte0;
- }
-
- private static String convert_to_string(byte abyte0[]) {
- String s = null;
- if (abyte0 != null)
- if (abyte0.length == 0)
- s = EMPTY_STRING;
- else
- try {
- s = new String(abyte0, STRING_CONVERSION_CODE);
- } catch (UnsupportedEncodingException unsupportedencodingexception) {
- s = null;
- }
- return s;
- }
-
- private static byte[] convert_viewable_to_bytes(String s) {
- byte abyte0[] = null;
- if (s != null)
- if (s.length() == 0)
- abyte0 = EMPTY_BYTE_ARRAY;
- else
- try {
- abyte0 = base64Decode(convert_to_bytes(s));
- } catch (Exception exception) {
- abyte0 = null;
- }
- return abyte0;
- }
-
- private static byte[] base64Decode(byte abyte0[]) {
- int i;
- for (i = abyte0.length; abyte0[--i] == 61;);
- byte abyte1[] = new byte[(i + 1) - abyte0.length / 4];
- for (int j = 0; j < abyte0.length; j++)
- abyte0[j] = BASE64_DECODE_MAP[abyte0[j]];
- int k = abyte1.length - 2;
- int l = 0;
- int i1;
- for (i1 = 0; l < k; i1 += 4) {
- abyte1[l] = (byte) (abyte0[i1] << 2 & 0xff | abyte0[i1 + 1] >>> 4 & 0x3);
- abyte1[l + 1] = (byte) (abyte0[i1 + 1] << 4 & 0xff | abyte0[i1 + 2] >>> 2 & 0xf);
- abyte1[l + 2] = (byte) (abyte0[i1 + 2] << 6 & 0xff | abyte0[i1 + 3] & 0x3f);
- l += 3;
- }
- if (l < abyte1.length) {
- abyte1[l++] = (byte) (abyte0[i1] << 2 & 0xff | abyte0[i1 + 1] >>> 4 & 0x3);
- if (l < abyte1.length)
- abyte1[l] = (byte) (abyte0[i1 + 1] << 4 & 0xff | abyte0[i1 + 2] >>> 2 & 0xf);
- }
- return abyte1;
- }
-
- private static String convert_viewable_to_string(byte abyte0[]) {
- String s = null;
- if (abyte0 != null)
- if (abyte0.length == 0)
- s = EMPTY_STRING;
- else
- try {
- s = convert_to_string(base64Encode(abyte0));
- } catch (Exception exception) {
- s = null;
- }
- return s;
- }
-
- private static byte[] base64Encode(byte abyte0[]) {
- byte abyte1[] = new byte[((abyte0.length + 2) / 3) * 4];
- int i = 0;
- int j = 0;
- for (; i < abyte0.length - 2; i += 3) {
- abyte1[j++] = BASE64_ENCODE_MAP[abyte0[i] >>> 2 & 0x3f];
- abyte1[j++] = BASE64_ENCODE_MAP[abyte0[i + 1] >>> 4 & 0xf | abyte0[i] << 4 & 0x3f];
- abyte1[j++] = BASE64_ENCODE_MAP[abyte0[i + 2] >>> 6 & 0x3 | abyte0[i + 1] << 2 & 0x3f];
- abyte1[j++] = BASE64_ENCODE_MAP[abyte0[i + 2] & 0x3f];
- }
- if (i < abyte0.length) {
- abyte1[j++] = BASE64_ENCODE_MAP[abyte0[i] >>> 2 & 0x3f];
- if (i < abyte0.length - 1) {
- abyte1[j++] = BASE64_ENCODE_MAP[abyte0[i + 1] >>> 4 & 0xf | abyte0[i] << 4 & 0x3f];
- abyte1[j++] = BASE64_ENCODE_MAP[abyte0[i + 1] << 2 & 0x3f];
- } else {
- abyte1[j++] = BASE64_ENCODE_MAP[abyte0[i] << 4 & 0x3f];
- }
- }
- for (; j < abyte1.length; j++)
- abyte1[j] = 61;
- return abyte1;
- }
-
- private static String decode_password(String s, String s1) {
- StringBuffer stringbuffer = new StringBuffer();
- if (s1.length() == 0) {
- stringbuffer.append(s);
- } else {
- String s2 = null;
- if (s.length() > 0) {
- byte abyte0[] = convert_viewable_to_bytes(s);
- if (abyte0 == null)
- return null;
- if (abyte0.length > 0) {
- byte abyte1[] = null;
- try {
- abyte1 = PasswordCipherUtil.decipher(abyte0, s1);
- } catch (InvalidPasswordCipherException invalidpasswordcipherexception) {
- return null;
- } catch (UnsupportedCryptoAlgorithmException unsupportedcryptoalgorithmexception) {
- return null;
- }
- if (abyte1 != null && abyte1.length > 0)
- s2 = convert_to_string(abyte1);
- }
- }
- if (s2 != null && s2.length() > 0)
- stringbuffer.append(s2);
- }
- return stringbuffer.toString();
- }
-
- private static String encode_password(String s, String s1) {
- StringBuffer stringbuffer = new StringBuffer("{"); //$NON-NLS-1$
- if (s1.length() == 0) {
- stringbuffer.append("}").append(s); //$NON-NLS-1$
- } else {
- stringbuffer.append(s1).append("}"); //$NON-NLS-1$
- String s2 = null;
- if (s.length() > 0) {
- byte abyte0[] = convert_to_bytes(s);
- if (abyte0.length > 0) {
- byte abyte1[] = null;
- try {
- abyte1 = PasswordCipherUtil.encipher(abyte0, s1);
- } catch (InvalidPasswordCipherException invalidpasswordcipherexception) {
- return null;
- } catch (UnsupportedCryptoAlgorithmException unsupportedcryptoalgorithmexception) {
- return null;
- }
- if (abyte1 != null && abyte1.length > 0) {
- s2 = convert_viewable_to_string(abyte1);
- if (s2 == null)
- return null;
- }
- }
- }
- if (s2 != null && s2.length() > 0)
- stringbuffer.append(s2);
- }
- return stringbuffer.toString();
- }
-
- static {
- SUPPORTED_CRYPTO_ALGORITHMS = PasswordCipherUtil.getSupportedCryptoAlgorithms();
- DEFAULT_CRYPTO_ALGORITHM = SUPPORTED_CRYPTO_ALGORITHMS[0];
- byte abyte0[] = {65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47};
- BASE64_ENCODE_MAP = abyte0;
- BASE64_DECODE_MAP = new byte[128];
- for (int i = 0; i < BASE64_DECODE_MAP.length; i++)
- BASE64_DECODE_MAP[i] = -1;
- for (int j = 0; j < BASE64_ENCODE_MAP.length; j++)
- BASE64_DECODE_MAP[BASE64_ENCODE_MAP[j]] = (byte) j;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PleaseMigrateYourCodeError.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PleaseMigrateYourCodeError.java
deleted file mode 100644
index 784991daa..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PleaseMigrateYourCodeError.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-
-/**
- * @author mdelder
- *
- */
-public class PleaseMigrateYourCodeError extends Error {
-
- //TODO Delete me
- public PleaseMigrateYourCodeError() {
- super(WFTUtilsResourceHandler.PleaseMigrateYourCodeError_ERROR_0); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ResourceDependencyRegister.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ResourceDependencyRegister.java
deleted file mode 100644
index 34ff6435f..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ResourceDependencyRegister.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.URIConverter;
-
-public class ResourceDependencyRegister {
- protected static Map GLOBAL_DEPENDENCIES = new HashMap();
- private static String RESOURCE_DEPENDENCY_TYPE = "ResourceDependencyAdapter"; //$NON-NLS-1$
- protected Map localDependencies = new HashMap();
-
- class ResourceDependencyAdapter extends AdapterImpl {
- Resource dependentResource;
-
- ResourceDependencyAdapter(Resource aDependentResource) {
- dependentResource = aDependentResource;
- dependentResource.eAdapters().add(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.notify.impl.AdapterImpl#isAdapterForType(java.lang.Object)
- */
- public boolean isAdapterForType(Object type) {
- return RESOURCE_DEPENDENCY_TYPE.equals(type);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- public void notifyChanged(Notification msg) {
- //Listen for unloads and removes
- switch (msg.getFeatureID(null)) {
- case Resource.RESOURCE__IS_LOADED :
- if (msg.getNotifier() != dependentResource && msg.getOldBooleanValue() && !msg.getNewBooleanValue())
- dependentResource.unload();
- break;
- case Resource.RESOURCE__RESOURCE_SET :
- if (msg.getOldValue() != null && msg.getNewValue() == null) {
- if (msg.getNotifier() == dependentResource)
- ((Resource) getTarget()).eAdapters().remove(this);
- else {
- ResourceSet set = dependentResource.getResourceSet();
- if (set != null)
- set.getResources().remove(dependentResource);
- }
- }
- break;
- }
- }
- }
-
- class ResourceSetListener extends AdapterImpl {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- public void notifyChanged(Notification msg) {
- if (msg.getEventType() == Notification.ADD)
- proccessAddedResource((ResourceSet) msg.getNotifier(), (Resource) msg.getNewValue());
- }
- }
-
- /**
- * Register a dependency between two URIs. The first parameter, aURIString, is the one that
- * dependentUriString depends on.
- *
- * @param aUriString
- * java.lang.String
- * @param dependentUriString
- * java.lang.String
- */
- public static void registerDependency(URI targetURI, URI dependentURI) {
- if (targetURI != null && dependentURI != null) {
- GLOBAL_DEPENDENCIES.put(dependentURI, targetURI);
- }
- }
-
- public ResourceDependencyRegister(ResourceSet aResourceSet) {
- initialize(aResourceSet);
- }
-
-
- ResourceDependencyRegister() {
- super();
- }
-
- /**
- * @param aResourceSet
- */
- protected void initialize(ResourceSet aResourceSet) {
- if (aResourceSet == null)
- throw new NullPointerException("The ResourceSet cannot be null."); //$NON-NLS-1$
- initializeLocalDependencies(aResourceSet);
- setupDependencyAdapters(aResourceSet);
- setupResourceSetListener(aResourceSet);
- }
-
- /**
- * @param aResourceSet
- */
- protected void setupResourceSetListener(ResourceSet aResourceSet) {
- aResourceSet.eAdapters().add(new ResourceSetListener());
- }
-
- /**
- * @param aResourceSet
- * @return
- */
- protected void setupDependencyAdapters(ResourceSet aResourceSet) {
- if (!aResourceSet.getResources().isEmpty()) {
- Iterator it = localDependencies.entrySet().iterator();
- Map.Entry entry;
- URI dependentURI, targetURI;
- while (it.hasNext()) {
- entry = (Map.Entry) it.next();
- dependentURI = (URI) entry.getKey();
- targetURI = (URI) entry.getValue();
- setupDependencyAdapter(aResourceSet, dependentURI, targetURI);
- }
- }
- }
-
- /**
- * @param aResourceSet
- * @param dependentURI
- * @param targetURI
- * @return
- */
- protected void setupDependencyAdapter(ResourceSet aResourceSet, URI dependentURI, URI targetURI) {
- Resource dependent = aResourceSet.getResource(dependentURI, false);
- if (dependent != null)
- setupDependencyAdapter(dependent, targetURI, aResourceSet);
- }
-
- protected void setupDependencyAdapter(Resource dependent, URI targetURI, ResourceSet aResourceSet) {
- Resource target = aResourceSet.getResource(targetURI, false);
- if (target == null)
- target = aResourceSet.createResource(targetURI);
- target.eAdapters().add(new ResourceDependencyAdapter(dependent));
- }
-
- /**
- * @param aResourceSet
- */
- protected void initializeLocalDependencies(ResourceSet aResourceSet) {
- URIConverter converter = aResourceSet.getURIConverter();
- initializeLocalDependencies(converter);
- }
-
- /**
- * @param aResourceSet
- */
- protected void initializeLocalDependencies(URIConverter aConverter) {
- Iterator it = GLOBAL_DEPENDENCIES.entrySet().iterator();
- Map resolved = new HashMap();
- Map.Entry entry;
- URI key, value;
- while (it.hasNext()) {
- entry = (Map.Entry) it.next();
- key = (URI) entry.getKey();
- value = (URI) entry.getValue();
- key = normalize(key, aConverter, resolved);
- value = normalize(value, aConverter, resolved);
- localDependencies.put(key, value);
- }
- }
-
- /**
- * @param relativeURI
- * @param converter
- * @param resolved
- * @return
- */
- protected URI normalize(URI relativeURI, URIConverter converter, Map resolved) {
- URI result = (URI) resolved.get(relativeURI);
- if (result == null) {
- result = converter.normalize(relativeURI);
- resolved.put(relativeURI, result);
- }
- return result;
- }
-
- /**
- * @param set
- * @param resource
- */
- protected void proccessAddedResource(ResourceSet set, Resource resource) {
- URI targetURI = (URI) localDependencies.get(resource.getURI());
- if (targetURI != null)
- setupDependencyAdapter(resource, targetURI, set);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Revisit.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Revisit.java
deleted file mode 100644
index 2ec67d491..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Revisit.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-public class Revisit {
-
- /**
- * Revisit constructor comment.
- */
- public Revisit() {
- super();
- }
-
- public static void revisit() {
- }
-
-
- public static void unComment() {
- }
-
- public static void toDo() {
- }
-
- public static void refactor() {
- }
-
- public static void removeDeprecatedMethod() {
- }
-
- public static void deleteMe() {
- }
-
- public static void reviewDesign() {
- }
-}
-
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/StringUtil.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/StringUtil.java
deleted file mode 100644
index d1f230858..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/StringUtil.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 18, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.utilities;
-
-/**
- * @author schacher
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class StringUtil {
- /**
- * Enhanced equality check for two string parameters, that takes into consideration null values.
- * If both values are null, this will return true.
- *
- * @param s1
- * @param s2
- * @return boolean
- */
- public static boolean stringsEqual(String s1, String s2) {
- if (s1 == null)
- return s2 == null;
- return s1.equals(s2);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/UnsupportedCryptoAlgorithmException.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/UnsupportedCryptoAlgorithmException.java
deleted file mode 100644
index f71c66d95..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/UnsupportedCryptoAlgorithmException.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-import org.omg.CORBA.UserException;
-
-public class UnsupportedCryptoAlgorithmException extends UserException {
-}
-
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/WFTUtilsResourceHandler.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/WFTUtilsResourceHandler.java
deleted file mode 100644
index 0ed13f81d..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/WFTUtilsResourceHandler.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-import org.eclipse.osgi.util.NLS;
-
-public class WFTUtilsResourceHandler extends NLS {
- private static final String BUNDLE_NAME = "wftutils";//$NON-NLS-1$
-
- private WFTUtilsResourceHandler() {
- // Do not instantiate
- }
-
- public static String DANGLING_HREF_ERROR_;
- public static String Integer_UI_;
- public static String Failed_to_convert__0__to___ERROR_;
- public static String Enumeration_UI_;
- public static String Short_UI_;
- public static String Character_UI_;
- public static String Long_UI_;
- public static String Double_UI_;
- public static String ResourceDependencyRegister_ERROR_0;
- public static String Float_UI_;
- public static String Byte_UI_;
- public static String Warning__Could_not_write_b_WARN_;
- public static String Boolean_UI_;
- public static String Stack_trace_of_nested_exce_ERROR_;
- public static String MofObject_UI_;
- public static String PleaseMigrateYourCodeError_ERROR_0;
- public static String EMF2DOMAdapterImpl_ERROR_0;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, WFTUtilsResourceHandler.class);
- }
-
- public static String getString(String key, Object[] args) {
- return NLS.bind(key, args);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/WriteBackHelper.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/WriteBackHelper.java
deleted file mode 100644
index 4ebaf35ac..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/WriteBackHelper.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-
-
-/**
- * @deprecated This class will be deleted. If you still need to use this class, please contact the
- * WCCM team. A class which can be used in conjunction with Encoder/Decoders to save
- * resources if they are made dirty by automatic encoding support. Usage Example:
- *
- * <pre>
- *
- *
- * // Use the standard WebSphere password value encoder/decoder.
- * EncoderDecoderRegistry.getDefaultRegistry().setDefaultEncoderDecoder(new com.ibm.ejs.security.util.WASEncoderDecoder());
- * // Begin tracking changes...
- * WriteBackHelper.begin();
- * // Load a resource which may have un-encoded values...
- * // Note: The WCCM will attempt to detect un-encoded values. If unencoded values
- * // are found, the value will be encoded, and the resource will be added to the
- * // WriteBackHelper.
- * Resource res = resourceSet.load(&quot;myResource&quot;);
- * // Ensure that any changes due to encoding are written back out.
- * WriteBackHelper.end();
- * </pre>
- */
-public class WriteBackHelper {
- private Set dirtyObjects = new HashSet();
- private boolean trackingChanges = false;
- private static WriteBackHelper _instance;
- static {
- //Deprecated class
- Revisit.deleteMe();
- }
-
- /**
- * Private constructor ensures proper usage through singleton.
- */
- private WriteBackHelper() {
- super();
- }
-
- /**
- * Adds a resource which is dirty, and needs to be saved.
- */
- public void addDirtyObject(EObject dirtyObject) {
- dirtyObjects.add(dirtyObject);
- }
-
- /**
- * Begin collecting objects which have changed.
- */
- public void begin() {
- trackingChanges = true;
- }
-
- /**
- * Attempts to save all dirty resources (if possible), then marks the resources as non-dirty.
- */
- public void end() {
- saveDirtyResources();
- reset();
- trackingChanges = false;
- }
-
- /**
- * Returns true if changes to mof objects are currently being tracked.
- */
- public boolean isActive() {
- return trackingChanges;
- }
-
- /**
- * Clears the list of dirty resources.
- */
- protected void reset() {
- dirtyObjects.clear();
- }
-
- /**
- * Attempts to save all dirty resources (if possible), then marks the resources as non-dirty.
- */
- protected void saveDirtyResources() {
- Set dirtyResources = new HashSet();
- Iterator dirtyObjIter = dirtyObjects.iterator();
- while (dirtyObjIter.hasNext()) {
- EObject dirtyObject = (EObject) dirtyObjIter.next();
- if (dirtyObject.eResource() != null && !dirtyResources.contains(dirtyObject)) {
- dirtyResources.add(dirtyObject.eResource());
- }
- }
- Iterator dirtyIter = dirtyResources.iterator();
- while (dirtyIter.hasNext()) {
- Resource dirtyResource = (Resource) dirtyIter.next();
- try {
- dirtyResource.save(Collections.EMPTY_MAP);
- } catch (Exception e) {
- warn(dirtyResource, e);
- }
- }
- }
-
- /**
- * Adds a resource which is dirty, and needs to be saved.
- */
- public static WriteBackHelper singleton() {
- if (_instance == null) {
- _instance = new WriteBackHelper();
- }
- return _instance;
- }
-
- /**
- * Warn the user of problems during save.
- */
- protected void warn(Resource res, Exception e) {
- System.err.println(WFTUtilsResourceHandler.getString(WFTUtilsResourceHandler.Warning__Could_not_write_b_WARN_, new Object[]{res.getURI()})); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/XMLValueEncoderDecoder.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/XMLValueEncoderDecoder.java
deleted file mode 100644
index d9a1d2c21..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/XMLValueEncoderDecoder.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emf.utilities;
-
-
-/**
- * An XML value escaping EncoderDecoder implementation
- */
-public class XMLValueEncoderDecoder extends EncoderDecoderAdapter implements EncoderDecoder {
- /**
- * Identifies the last printable character in the Unicode range that is supported by the
- * encoding used with this serializer. For 8-bit encodings this will be either 0x7E or 0xFF. For
- * 16-bit encodings this will be 0xFFFF. Characters that are not printable will be escaped using
- * character references.
- */
- private int _lastPrintable = 0x7E;
- protected static XMLValueEncoderDecoder _singleton;
-
- /**
- * EncoderDecoderAdapter constructor comment.
- */
- public XMLValueEncoderDecoder() {
- super();
- }
-
- /**
- * Returns a decoded version of the value.
- */
- public String decode(String value) {
- // NOT_IMPLEMENTED
- return value;
- }
-
- /**
- * Escapes a string so it may be printed as text content or attribute value. Non printable
- * characters are escaped using character references. Where the format specifies a deault entity
- * reference, that reference is used (e.g. <tt>&amp;lt;</tt>).
- *
- * @param source
- * The string to escape
- */
- public String encode(String value) {
- StringBuffer sbuf = new StringBuffer(value.length());
- String charRef = null;
- char ch;
- for (int i = 0; i < value.length(); ++i) {
- ch = value.charAt(i);
- // If there is a suitable entity reference for this
- // character, print it. The list of available entity
- // references is almost but not identical between
- // XML and HTML.
- charRef = getEntityRef(ch);
- if (charRef != null) {
- sbuf.append('&');
- sbuf.append(charRef);
- sbuf.append(';');
- } else if ((ch >= ' ' && ch <= _lastPrintable && ch != 0xF7) || ch == '\n' || ch == '\r' || ch == '\t') {
- // If the character is not printable, print as character reference.
- // Non printables are below ASCII space but not tab or line
- // terminator, ASCII delete, or above a certain Unicode threshold.
- sbuf.append(ch);
- } else {
- sbuf.append("&#");//$NON-NLS-1$
- sbuf.append(Integer.toString(ch));
- sbuf.append(';');
- }
- }
- return sbuf.toString();
- }
-
- public static String escape(String value) {
- if (_singleton == null) {
- _singleton = new XMLValueEncoderDecoder();
- }
- return _singleton.encode(value);
- }
-
- /**
- * Returns the suitable entity reference for this character value, or null if no such entity
- * exists. Calling this method with <tt>'&amp;'</tt> will return <tt>"&amp;amp;"</tt>.
- *
- * @param ch
- * Character value
- * @return Character entity name, or null
- */
- protected String getEntityRef(char ch) {
- // Encode special XML characters into the equivalent character references.
- // These five are defined by default for all XML documents.
- switch (ch) {
- case '<' :
- return "lt";//$NON-NLS-1$
- case '>' :
- return "gt";//$NON-NLS-1$
- case '"' :
- return "quot";//$NON-NLS-1$
- case '\'' :
- return "apos";//$NON-NLS-1$
- case '&' :
- return "amp";//$NON-NLS-1$
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/wftutils.properties b/plugins/org.eclipse.wst.common.emf/wtpemf/wftutils.properties
deleted file mode 100644
index 8c7b45a5b..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/wftutils.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Warning__Could_not_write_b_WARN_=IWAE0008W Warning: Could not write back {0}
-Stack_trace_of_nested_exce_ERROR_=IWAE0009E Stack trace of nested exception:
-Enumeration_UI_=Enumeration
-Double_UI_=Double
-Float_UI_=Float
-Long_UI_=Long
-Short_UI_=Short
-Boolean_UI_=Boolean
-Integer_UI_=Integer
-Character_UI_=Character
-Byte_UI_=Byte
-Failed_to_convert__0__to___ERROR_=IWAE0014E Failed to convert {0} to {1}.
-DANGLING_HREF_ERROR_=IWAE0001E Unable to resolve HREF {0}. Check the descriptor files and ensure the ids are valid.
-MofObject_UI_=MofObject_UI_
-PleaseMigrateYourCodeError_ERROR_0=PleaseMigrateYourCodeError_ERROR_0
-EMF2DOMAdapterImpl_ERROR_0=EMF2DOMAdapterImpl_ERROR_0
-
-ResourceDependencyRegister_ERROR_0=IWAE0002E The ResourceSet cannot be null.
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/.classpath b/plugins/org.eclipse.wst.common.emfworkbench.integration/.classpath
deleted file mode 100644
index 377edbf6b..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="property_file"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/.cvsignore b/plugins/org.eclipse.wst.common.emfworkbench.integration/.cvsignore
deleted file mode 100644
index 73ba5fbcb..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-bin
-temp.folder
-build.xml
-emfworkbenchedit.jar
-@dot
-src.zip
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/.project b/plugins/org.eclipse.wst.common.emfworkbench.integration/.project
deleted file mode 100644
index afef01a8b..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.common.emfworkbench.integration</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.emfworkbench.integration/META-INF/MANIFEST.MF
deleted file mode 100644
index d5d9e9a8b..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: EMF Workbench Edit Plug-in
-Bundle-SymbolicName: org.eclipse.wst.common.emfworkbench.integration; singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.wst.common.internal.emfworkbench.integration.EMFWorkbenchEditPlugin
-Bundle-Vendor: Eclipse.org
-Bundle-Localization: plugin
-Export-Package: .,
- org.eclipse.wst.common.internal.emfworkbench,
- org.eclipse.wst.common.internal.emfworkbench.edit,
- org.eclipse.wst.common.internal.emfworkbench.integration,
- org.eclipse.wst.common.internal.emfworkbench.validateedit
-Require-Bundle: org.eclipse.wst.common.frameworks,
- org.eclipse.jem.util,
- org.eclipse.emf.edit,
- org.eclipse.emf.ecore.xmi,
- org.eclipse.wst.common.emf,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.xsd,
- org.eclipse.wst.validation,
- org.eclipse.wst.common.project.facet.core
-Eclipse-AutoStart: true
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/about.html b/plugins/org.eclipse.wst.common.emfworkbench.integration/about.html
deleted file mode 100644
index 6f6b96c4c..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/about.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>February 24, 2005</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/build.properties b/plugins/org.eclipse.wst.common.emfworkbench.integration/build.properties
deleted file mode 100644
index a288ad72a..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/,\
- property_file/
-output.. = bin/
-bin.includes = plugin.xml,\
- .,\
- META-INF/,\
- about.html,\
- plugin.properties
-src.includes = schema/
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/plugin.properties b/plugins/org.eclipse.wst.common.emfworkbench.integration/plugin.properties
deleted file mode 100644
index 2b001fdcf..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/plugin.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-EMF_Resource_Edit_Model=EMF Resource Edit Model
-Edit_Model_Extensions=Edit Model Extensions
-Adapter_Factory_Extension=Adapter Factory Extension
-ModifierHelperFactory=ModifierHelperFactory \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/plugin.xml b/plugins/org.eclipse.wst.common.emfworkbench.integration/plugin.xml
deleted file mode 100644
index f27b788e1..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/plugin.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension-point id="editModel" name="%EMF_Resource_Edit_Model" schema="schema/editModel.exsd"/>
- <extension-point id="editModelExtension" name="%Edit_Model_Extensions" schema="schema/editModelExtension.exsd"/>
- <extension-point id="adapterFactory" name="%Adapter_Factory_Extension" schema="schema/adapterFactory.exsd"/>
- <extension-point id="ModifierHelperFactory" name="%ModifierHelperFactory" schema="schema/modifierHelperFactory.exsd"/>
-
- <extension
- point="org.eclipse.jem.util.internalWorkbenchContextFactory">
- <factoryClass
- name="org.eclipse.wst.common.internal.emfworkbench.edit.EMFWorkbenchEditContextFactory">
- </factoryClass>
- </extension>
-
- <extension
- id="emfValidationHandler"
- name="emfValidationHandler"
- point="org.eclipse.wst.validation.validationSelectionHandler">
- <validationSelectionHandler
- id="emfValidationHandler"
- handlerClass="org.eclipse.wst.common.internal.emfworkbench.EmfValidationHandler"
- selectionType="org.eclipse.emf.ecore.EObject"/>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/prepareforpii.xml b/plugins/org.eclipse.wst.common.emfworkbench.integration/prepareforpii.xml
deleted file mode 100644
index 26d1d462a..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/prepareforpii.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<project name="PrepareForPII" default="main" basedir=".">
-
- <!-- Setup temp variables -->
- <target name="init">
- <property name="nlsDir" value="d:/NLS/Corona/0526"/>
- <property name="plugin" value="com.ibm.wtp.emf.workbench.edit"/>
- <property name="plugindir" value="d:/workspaceCorona/${plugin}"/>
- <property name="outputDir" value="${nlsDir}/${plugin}"/>
-
-
- </target>
-
- <!-- Create the destination dir -->
- <target name="nlsDir" depends="init">
- <mkdir dir="${nlsDir}"/>
- </target>
-
- <!-- Create the destination dir -->
- <target name="plugindir" depends="nlsDir">
- <delete dir="${outputDir}"/>
- <mkdir dir="${outputDir}"/>
- </target>
-
- <!-- Move the files to the correct locations in the workspace. -->
- <target name="main" depends="plugindir">
-
- <messageIdGen folderPath = "${plugindir}" componentId = "E" />
-
- <copy todir = "${outputDir}/property_file" >
- <fileset dir="${plugindir}/property_file">
- <include name="**/*.properties"/>
- </fileset>
- </copy>
-
-
- </target>
-</project>
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/property_file/emftosed.properties b/plugins/org.eclipse.wst.common.emfworkbench.integration/property_file/emftosed.properties
deleted file mode 100644
index 77d84dfd8..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/property_file/emftosed.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Unexpected_IO_exception_occurred_creating_xml_document_1_EXC_=IWAE0017E Unexpected IO exception occurred creating xml document
-EMF2DOMSedRenderer_UI_0={0} should not use an OutputStream for loading
-EMF2DOMSedRenderer_UI_1={0} should not use an InputStream for loading
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/property_file/emfworkbenchedit.properties b/plugins/org.eclipse.wst.common.emfworkbench.integration/property_file/emfworkbenchedit.properties
deleted file mode 100644
index 631d1c3c8..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/property_file/emfworkbenchedit.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-DynamicAdapterFactory_ERROR_0=IWAE0010E A null EPackage will not be tied to any Adapter Factory.
-ClientAccessRegistryException_UI_0=There are at least {0} improperly released edit models.
-ClientAccessRegistryException_UI_1=This exception was generated to indicate an invalid usage of reference counts.\n Typically, this occurs on attempts to open an already open artifact edit.\n Make sure the dispose method is called when done accessing.\n Please examine the stack trace.\n Client Access Exception of type {0} \n
-ClientAccessRegistry_ERROR_0=IWAE0011E Key already used to access Resource
-ClientAccessRegistry_ERROR_1=IWAE0012E Key has not properly accessed Resource.
-EditModelRegistry_ERROR_0=IWAE0013E The inheritance hierarchy for the Edit Model \"{0}\" contains a cycle. Please correct the entries in your plugin.xml files.
-EditModelRegistry_ERROR_1=IWAE0014E Could not create factory because IConfigurationElement is null.
-EditModelRegistry_ERROR_2=IWAE0015E No EditModelFactory for key \"{0}\"
-Snapshot_ERROR_0=IWAE0016E Locking Insurance Stack Trace
-AdapterFactoryDescriptor_ERROR_0=IWAE0017E A packageURI is required for all Adapter Factories
-AdapterFactoryDescriptor_ERROR_1=IWAE0018E An id is required for all Adapter Factories. Check all adapter factories defined in \"{0}\".
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/rose/ModuleCore.genmodel b/plugins/org.eclipse.wst.common.emfworkbench.integration/rose/ModuleCore.genmodel
deleted file mode 100644
index 5d6bdddfc..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/rose/ModuleCore.genmodel
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.wst.common.emfworkbench.integration/src"
- editDirectory="/org.eclipse.wst.common.emfworkbench.integration.edit/src" editorDirectory="/org.eclipse.wst.common.emfworkbench.integration.editor/src"
- modelPluginID="org.eclipse.wst.common.emfworkbench.integration" runtimeJar="true"
- modelName="ProjectModule" editPluginClass="org.eclipse.wst.projectmodule.provider.ModuleCoreEditPlugin"
- editorPluginClass="org.eclipse.wst.projectmodule.presentation.ModuleCoreEditorPlugin"
- runtimeCompatibility="false">
- <foreignModel>moduleCore.mdl</foreignModel>
- <foreignModel>WORKSPACE_ROOT</foreignModel>
- <foreignModel>D:\work\WTP</foreignModel>
- <genPackages prefix="ModuleCore" basePackage="org.eclipse.wst.common" disposableProviderFactory="true"
- ecorePackage="moduleCore.ecore#/">
- <genEnums ecoreEnum="moduleCore.ecore#//DependencyType">
- <genEnumLiterals ecoreEnumLiteral="moduleCore.ecore#//DependencyType/uses"/>
- <genEnumLiterals ecoreEnumLiteral="moduleCore.ecore#//DependencyType/consumes"/>
- </genEnums>
- <genDataTypes ecoreDataType="moduleCore.ecore#//URI"/>
- <genClasses ecoreClass="moduleCore.ecore#//WorkbenchModule">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute moduleCore.ecore#//WorkbenchModule/handle"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute moduleCore.ecore#//WorkbenchModule/deployedName"/>
- <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference moduleCore.ecore#//WorkbenchModule/resources"/>
- <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference moduleCore.ecore#//WorkbenchModule/moduleType"/>
- <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference moduleCore.ecore#//WorkbenchModule/modules"/>
- </genClasses>
- <genClasses ecoreClass="moduleCore.ecore#//WorkbenchModuleResource">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute moduleCore.ecore#//WorkbenchModuleResource/sourcePath"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute moduleCore.ecore#//WorkbenchModuleResource/deployedPath"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute moduleCore.ecore#//WorkbenchModuleResource/exclusions"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference moduleCore.ecore#//WorkbenchModuleResource/module"/>
- </genClasses>
- <genClasses ecoreClass="moduleCore.ecore#//ModuleType">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute moduleCore.ecore#//ModuleType/metadataResources"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute moduleCore.ecore#//ModuleType/moduleTypeId"/>
- </genClasses>
- <genClasses ecoreClass="moduleCore.ecore#//ProjectModules">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute moduleCore.ecore#//ProjectModules/projectName"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference moduleCore.ecore#//ProjectModules/workbenchModules"/>
- </genClasses>
- <genClasses ecoreClass="moduleCore.ecore#//DependentModule">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute moduleCore.ecore#//DependentModule/handle"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute moduleCore.ecore#//DependentModule/deployedPath"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute moduleCore.ecore#//DependentModule/dependencyType"/>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.cat b/plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.cat
deleted file mode 100644
index 330f5b88d..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.cat
+++ /dev/null
@@ -1,1065 +0,0 @@
-
-(object Petal
- version 50
- _written "Rose 8.3.0407.2800"
- charSet 0)
-
-(object Class_Category "moduleCore"
- is_unit TRUE
- is_loaded TRUE
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "basePackage"
- value (value Text "org.eclipse.wst.common"))
- (object Attribute
- tool "Ecore"
- name "prefix"
- value (value Text "ModuleCore"))
- (object Attribute
- tool "Ecore"
- name "nsURI"
- value (value Text "modulecore.xmi")))
- quid "3A0DB68B0046"
- visible_categories (list visibility_relationship_list
- (object Visibility_Relationship
- quid "3F2E8236025A"
- supplier "Logical View::ejbext"
- quidu "39AA86660190")
- (object Visibility_Relationship
- quid "3F2E8236025B"
- supplier "Logical View::webappext"
- quidu "39B534FD024C")
- (object Visibility_Relationship
- quid "3F2E8236025C"
- supplier "Logical View::ejbbnd"
- quidu "39B960FC03CA")
- (object Visibility_Relationship
- quid "3F2E82360264"
- supplier "Logical View::webappbnd"
- quidu "39B961060107")
- (object Visibility_Relationship
- quid "3F2E82360265"
- supplier "Logical View::clientbnd"
- quidu "39B9614F031F")
- (object Visibility_Relationship
- quid "3F2E82360266"
- supplier "Logical View::applicationext"
- quidu "3A22E6080303")
- (object Visibility_Relationship
- quid "3F2E82360267"
- supplier "Logical View::applicationbnd"
- quidu "39B9611502A4")
- (object Visibility_Relationship
- quid "3F2E82360268"
- supplier "Logical View::j2cbnd"
- quidu "39B9632E038C"))
- exportControl "Public"
- logical_models (list unit_reference_list
- (object Class "WorkbenchModule"
- quid "41E3DF5801FA"
- class_attributes (list class_attribute_list
- (object ClassAttribute "handle"
- quid "41EC1D71015D"
- type "URI"
- quidu "41EC26DA027A"
- exportControl "Public")
- (object ClassAttribute "deployedName"
- quid "4201471D0208"
- type "String"
- exportControl "Public")))
- (object Class "WorkbenchModuleResource"
- quid "41E3DF670039"
- class_attributes (list class_attribute_list
- (object ClassAttribute "sourcePath"
- quid "41E3DF970128"
- type "URI"
- quidu "41EC26DA027A"
- exportControl "Public")
- (object ClassAttribute "deployedPath"
- quid "41EEC640025B"
- type "URI"
- quidu "41EC26DA027A"
- exportControl "Public")
- (object ClassAttribute "exclusions"
- quid "41E3DF9E011E"
- stereotype "0..*"
- type "URI"
- quidu "41EC26DA027A"
- exportControl "Public")))
- (object Class "ModuleType"
- quid "41EC1D5103E2"
- class_attributes (list class_attribute_list
- (object ClassAttribute "metadataResources"
- quid "41EC1DF0021E"
- stereotype "0..*"
- type "URI"
- quidu "41EC26DA027A"
- exportControl "Public")
- (object ClassAttribute "moduleTypeId"
- quid "41EC21340357"
- type "String"
- exportControl "Public")))
- (object Class "URI"
- quid "41EC26DA027A"
- stereotype "datatype"
- class_attributes (list class_attribute_list
- (object ClassAttribute "org.eclipse.emf.common.util.URI"
- quid "41EC270803AC"
- stereotype "javaclass"
- exportControl "Public")))
- (object Class "ProjectModules"
- quid "41F566DB0251"
- class_attributes (list class_attribute_list
- (object ClassAttribute "projectName"
- quid "41F567FD023A"
- type "String"
- exportControl "Public")))
- (object Class "DependentModule"
- quid "41F6C24B023D"
- class_attributes (list class_attribute_list
- (object ClassAttribute "handle"
- quid "420145F001C9"
- type "URI"
- quidu "41EC26DA027A"
- exportControl "Public")
- (object ClassAttribute "deployedPath"
- quid "420145FA0015"
- type "URI"
- quidu "41EC26DA027A"
- exportControl "Public")
- (object ClassAttribute "dependencyType"
- quid "42039243016E"
- type "DependencyType"
- quidu "420394F50185"
- exportControl "Public")))
- (object Class "DependencyType"
- quid "420394F50185"
- documentation
-|uses=0
-|consumes=1
-
- stereotype "enumeration"
- class_attributes (list class_attribute_list
- (object ClassAttribute "uses"
- quid "42039938018D"
- exportControl "Public")
- (object ClassAttribute "consumes"
- quid "42039A6E0139"
- exportControl "Public")))
- (object Association "$UNNAMED$0"
- quid "41E3E14B01E3"
- roles (list role_list
- (object Role "resources"
- quid "41E3E14D031D"
- label "resources"
- supplier "Logical View::moduleCore::WorkbenchModuleResource"
- quidu "41E3DF670039"
- client_cardinality (value cardinality "0..*")
- Containment "By Value"
- is_navigable TRUE)
- (object Role "module"
- quid "41E3E14D031F"
- label "module"
- supplier "Logical View::moduleCore::WorkbenchModule"
- quidu "41E3DF5801FA"
- client_cardinality (value cardinality "1")
- is_navigable TRUE
- is_aggregate TRUE)))
- (object Association "$UNNAMED$1"
- quid "41EC1D9802C2"
- roles (list role_list
- (object Role "moduleType"
- quid "41EC1D990241"
- label "moduleType"
- supplier "Logical View::moduleCore::ModuleType"
- quidu "41EC1D5103E2"
- client_cardinality (value cardinality "1")
- is_navigable TRUE)
- (object Role "$UNNAMED$2"
- quid "41EC1D990243"
- supplier "Logical View::moduleCore::WorkbenchModule"
- quidu "41E3DF5801FA")))
- (object Association "$UNNAMED$3"
- quid "41F5672000E8"
- roles (list role_list
- (object Role "workbenchModules"
- quid "41F567210111"
- label "workbenchModules"
- supplier "Logical View::moduleCore::WorkbenchModule"
- quidu "41E3DF5801FA"
- client_cardinality (value cardinality "0..*")
- Containment "By Value"
- is_navigable TRUE)
- (object Role "$UNNAMED$4"
- quid "41F567210113"
- supplier "Logical View::moduleCore::ProjectModules"
- quidu "41F566DB0251"
- Containment "By Reference"
- is_aggregate TRUE)))
- (object Association "$UNNAMED$5"
- quid "420146A502E2"
- roles (list role_list
- (object Role "modules"
- quid "420146A6027F"
- label "modules"
- supplier "Logical View::moduleCore::DependentModule"
- quidu "41F6C24B023D"
- client_cardinality (value cardinality "0..*")
- is_navigable TRUE)
- (object Role "$UNNAMED$6"
- quid "420146A60281"
- supplier "Logical View::moduleCore::WorkbenchModule"
- quidu "41E3DF5801FA"))))
- logical_presentations (list unit_reference_list
- (object ClassDiagram "Main"
- quid "41E3DF060210"
- title "Main"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 100
- origin_y 0
- items (list diagram_item_list
- (object ClassView "Class" "Logical View::moduleCore::URI" @1
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1920, 1648)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @1
- location (1460, 1589)
- fill_color 13434879
- nlines 1
- max_width 920
- justify 0
- label "URI")
- stereotype (object ItemLabel
- Parent_View @1
- location (1460, 1539)
- fill_color 13434879
- anchor 10
- nlines 1
- max_width 920
- justify 0
- label "<<datatype>>")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "41EC26DA027A"
- compartment (object Compartment
- Parent_View @1
- location (1460, 1650)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 2
- max_width 925)
- width 938
- height 242
- annotation 8
- autoResize TRUE)
- (object NoteView @2
- location (448, 1264)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @2
- location (176, 1055)
- fill_color 13434879
- nlines 8
- max_width 508
- label
-|The module "handle" URI will contain the special Module protocol, project name, and module identifier, and will be fully resolved to a full platform URI
- )
- line_color 3342489
- fill_color 13434879
- width 568
- height 431)
- (object ClassView "Class" "Logical View::moduleCore::WorkbenchModuleResource" @3
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (992, 1744)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @3
- location (714, 1613)
- fill_color 13434879
- nlines 1
- max_width 556
- justify 0
- label "WorkbenchModuleResource")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "41E3DF670039"
- compartment (object Compartment
- Parent_View @3
- location (714, 1674)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 4
- max_width 531)
- width 574
- height 286
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::moduleCore::ModuleType" @4
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1856, 1136)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @4
- location (1509, 1030)
- fill_color 13434879
- nlines 1
- max_width 694
- justify 0
- label "ModuleType")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "41EC1D5103E2"
- compartment (object Compartment
- Parent_View @4
- location (1509, 1091)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 3
- max_width 700)
- width 712
- height 236
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::moduleCore::ProjectModules" @5
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (416, 368)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @5
- location (204, 287)
- fill_color 13434879
- nlines 1
- max_width 424
- justify 0
- label "ProjectModules")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "41F566DB0251"
- compartment (object Compartment
- Parent_View @5
- location (204, 348)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 2
- max_width 431)
- width 442
- height 186
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::moduleCore::DependentModule" @6
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1824, 480)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @6
- location (1470, 349)
- fill_color 13434879
- nlines 1
- max_width 708
- justify 0
- label "DependentModule")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "41F6C24B023D"
- compartment (object Compartment
- Parent_View @6
- location (1470, 410)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 13434879
- anchor 2
- nlines 4
- max_width 715)
- width 726
- height 286
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::moduleCore::WorkbenchModule" @7
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (944, 752)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @7
- location (712, 646)
- fill_color 13434879
- nlines 1
- max_width 464
- justify 0
- label "WorkbenchModule")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "41E3DF5801FA"
- compartment (object Compartment
- Parent_View @7
- location (712, 707)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 3
- max_width 471)
- width 482
- height 236
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$0" @8
- location (940, 1235)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- stereotype TRUE
- line_color 3342489
- quidu "41E3E14B01E3"
- roleview_list (list RoleViews
- (object RoleView "resources" @9
- Parent_View @8
- location (460, 355)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @10
- Parent_View @9
- location (1075, 1501)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 216
- justify 0
- label "+resources"
- pctDist 0.726776
- height 135
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "41E3E14D031D"
- client @8
- supplier @3
- vertices (list Points
- (940, 1235)
- (940, 1601))
- line_style 3
- origin_attachment (940, 1235)
- terminal_attachment (940, 1601)
- label (object SegLabel @11
- Parent_View @9
- location (861, 1495)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..*"
- pctDist 0.710383
- height 79
- orientation 1))
- (object RoleView "module" @12
- Parent_View @8
- location (460, 355)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @13
- Parent_View @12
- location (1043, 972)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 172
- justify 0
- label "+module"
- pctDist 0.720824
- height 103
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "41E3E14D031F"
- client @8
- supplier @7
- vertices (list Points
- (940, 1235)
- (940, 870))
- line_style 3
- origin_attachment (940, 1235)
- terminal_attachment (940, 870)
- label (object SegLabel @14
- Parent_View @12
- location (868, 976)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.709382
- height 73
- orientation 0))))
- (object AssociationViewNew "$UNNAMED$1" @15
- location (1634, 791)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- stereotype TRUE
- line_color 3342489
- quidu "41EC1D9802C2"
- roleview_list (list RoleViews
- (object RoleView "moduleType" @16
- Parent_View @15
- location (1298, -137)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @17
- Parent_View @16
- location (2010, 977)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 260
- justify 0
- label "+moduleType"
- pctDist 0.911573
- height 153
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "41EC1D990241"
- client @15
- supplier @4
- vertices (list Points
- (1634, 791)
- (1857, 791)
- (1857, 1018))
- line_style 3
- origin_attachment (1634, 791)
- terminal_attachment (1857, 1018)
- label (object SegLabel @18
- Parent_View @16
- location (1804, 972)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.900000
- height 54
- orientation 1))
- (object RoleView "$UNNAMED$2" @19
- Parent_View @15
- location (1298, -137)
- stereotype TRUE
- line_color 3342489
- quidu "41EC1D990243"
- client @15
- supplier @7
- vertices (list Points
- (1634, 791)
- (1185, 791))
- line_style 3
- origin_attachment (1634, 791)
- terminal_attachment (1185, 791))))
- (object AttachView "" @20
- stereotype TRUE
- line_color 3342489
- client @2
- supplier @7
- vertices (list Points
- (657, 1048)
- (829, 870))
- line_style 0)
- (object AssociationViewNew "$UNNAMED$3" @21
- location (399, 691)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- stereotype TRUE
- line_color 3342489
- quidu "41F5672000E8"
- roleview_list (list RoleViews
- (object RoleView "workbenchModules" @22
- Parent_View @21
- location (-33, 403)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @23
- Parent_View @22
- location (476, 747)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 373
- justify 0
- label "+workbenchModules"
- pctDist 0.253289
- height 56
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "41F567210111"
- client @21
- supplier @7
- vertices (list Points
- (399, 691)
- (703, 691))
- line_style 3
- origin_attachment (399, 691)
- terminal_attachment (703, 691)
- label (object SegLabel @24
- Parent_View @22
- location (640, 632)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..*"
- pctDist 0.792763
- height 59
- orientation 0))
- (object RoleView "$UNNAMED$4" @25
- Parent_View @21
- location (-33, 403)
- stereotype TRUE
- line_color 3342489
- quidu "41F567210113"
- client @21
- supplier @5
- vertices (list Points
- (399, 691)
- (325, 691)
- (325, 461))
- line_style 3
- origin_attachment (399, 691)
- terminal_attachment (325, 461))))
- (object AssociationViewNew "$UNNAMED$5" @26
- location (1322, 633)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- stereotype TRUE
- line_color 3342489
- quidu "420146A502E2"
- roleview_list (list RoleViews
- (object RoleView "modules" @27
- Parent_View @26
- location (490, -711)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @28
- Parent_View @27
- location (1367, 545)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 180
- justify 0
- label "+modules"
- pctDist 0.475736
- height 72
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "420146A6027F"
- client @26
- supplier @6
- vertices (list Points
- (1322, 633)
- (1460, 589))
- line_style 0
- label (object SegLabel @29
- Parent_View @27
- location (1427, 662)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..*"
- pctDist 0.636077
- height 59
- orientation 1))
- (object RoleView "$UNNAMED$6" @30
- Parent_View @26
- location (490, -711)
- stereotype TRUE
- line_color 3342489
- quidu "420146A60281"
- client @26
- supplier @7
- vertices (list Points
- (1322, 633)
- (1185, 675))
- line_style 0)))
- (object NoteView @31
- location (2784, 416)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @31
- location (2387, 166)
- fill_color 13434879
- nlines 10
- max_width 759
- label
-|The dependent module "handle" must be resolvable to a WorkbenchModule.
-|
-|The DeployedPath specifies the location of the referenced module in this deployment structure.
-|
-|The dependencyType specifies how the dependent module is assembled.
- )
- line_color 3342489
- fill_color 13434879
- width 819
- height 513)
- (object ClassView "Class" "Logical View::moduleCore::DependencyType" @32
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (2560, 944)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @32
- location (2387, 860)
- fill_color 13434879
- nlines 1
- max_width 346
- justify 0
- label "DependencyType")
- stereotype (object ItemLabel
- Parent_View @32
- location (2387, 810)
- fill_color 13434879
- anchor 10
- nlines 1
- max_width 346
- justify 0
- label "<<enumeration>>")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "420394F50185"
- compartment (object Compartment
- Parent_View @32
- location (2387, 921)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 13434879
- anchor 2
- nlines 3
- max_width 237)
- width 364
- height 292
- annotation 8
- autoResize TRUE)
- (object AttachView "" @33
- stereotype TRUE
- line_color 3342489
- client @6
- supplier @31
- vertices (list Points
- (2187, 455)
- (2374, 443))
- line_style 0)))))
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.ecore b/plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.ecore
deleted file mode 100644
index 00723f2dd..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.ecore
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="modulecore"
- nsURI="modulecore.xmi" nsPrefix="org.eclipse.wst.common.modulecore">
- <eClassifiers xsi:type="ecore:EClass" name="WorkbenchModule">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="handle" eType="#//URI"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="deployedName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="resources" upperBound="-1"
- eType="#//WorkbenchModuleResource" containment="true" eOpposite="#//WorkbenchModuleResource/module"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="moduleType" lowerBound="1"
- eType="#//ModuleType"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="modules" upperBound="-1"
- eType="#//DependentModule"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="WorkbenchModuleResource">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="sourcePath" eType="#//URI"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="deployedPath" eType="#//URI"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="exclusions" upperBound="-1"
- eType="#//URI"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="module" lowerBound="1"
- eType="#//WorkbenchModule" transient="true" eOpposite="#//WorkbenchModule/resources"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ModuleType">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="metadataResources" upperBound="-1"
- eType="#//URI"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="moduleTypeId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EDataType" name="URI" instanceClassName="org.eclipse.emf.common.util.URI"/>
- <eClassifiers xsi:type="ecore:EClass" name="ProjectModules">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="projectName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="workbenchModules" upperBound="-1"
- eType="#//WorkbenchModule" containment="true"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="DependentModule">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="handle" eType="#//URI"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="deployedPath" eType="#//URI"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="dependencyType" eType="#//DependencyType"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EEnum" name="DependencyType">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="uses=0&#xD;&#xA;consumes=1"/>
- </eAnnotations>
- <eLiterals name="uses"/>
- <eLiterals name="consumes" value="1"/>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.mdl b/plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.mdl
deleted file mode 100644
index 7e9b4c591..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.mdl
+++ /dev/null
@@ -1,8839 +0,0 @@
-
-(object Petal
- version 50
- _written "Rose 8.3.0407.2800"
- charSet 0)
-
-(object Design "Logical View"
- is_unit TRUE
- is_loaded TRUE
- attributes (list Attribute_Set
- (object Attribute
- tool "Java"
- name "IDE"
- value "Internal Editor")
- (object Attribute
- tool "Java"
- name "UserDefineTagName1"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagText1"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagApply1"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagName2"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagText2"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagApply2"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagName3"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagText3"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagApply3"
- value ""))
- quid "3A0B2474025F"
- enforceClosureAutoLoad FALSE
- defaults (object defaults
- rightMargin 0.250000
- leftMargin 0.250000
- topMargin 0.250000
- bottomMargin 0.500000
- pageOverlap 0.250000
- clipIconLabels TRUE
- autoResize TRUE
- snapToGrid TRUE
- gridX 16
- gridY 16
- defaultFont (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- showMessageNum 1
- showClassOfObject TRUE
- notation "Unified")
- root_usecase_package (object Class_Category "Use Case View"
- quid "3A0B2474026A"
- exportControl "Public"
- global TRUE
- logical_models (list unit_reference_list)
- logical_presentations (list unit_reference_list
- (object UseCaseDiagram "Main"
- quid "3A0B24790339"
- title "Main"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list))))
- root_category (object Class_Category "Logical View"
- quid "3A0B24740269"
- exportControl "Public"
- global TRUE
- subsystem "Component View"
- quidu "3A0B2474027D"
- logical_models (list unit_reference_list
- (object Class_Category "moduleCore"
- is_unit TRUE
- is_loaded FALSE
- file_name "$WORKSPACE_ROOT\\org.eclipse.wst.common.emfworkbench.integration\\rose\\moduleCore.cat"
- quid "3A0DB68B0046"))
- logical_presentations (list unit_reference_list
- (object ClassDiagram "PackageView"
- quid "3A0B24790360"
- title "PackageView"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 650
- origin_y 0
- items (list diagram_item_list
- (object CategoryView "Logical View::moduleCore" @1
- location (352, 320)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @1
- location (208, 236)
- fill_color 13434879
- nlines 2
- max_width 288
- justify 0
- label "moduleCore")
- icon_style "Label"
- line_color 3342489
- fill_color 13434879
- quidu "3A0DB68B0046"
- width 300
- height 180)))))
- root_subsystem (object SubSystem "Component View"
- quid "3A0B2474027D"
- physical_models (list unit_reference_list)
- physical_presentations (list unit_reference_list
- (object Module_Diagram "Main"
- quid "3A0B24790338"
- title "Main"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list)))
- category "Logical View"
- quidu "41EC1C3B00A4")
- process_structure (object Processes
- quid "3A0B2474027E"
- ProcsNDevs (list
- (object Process_Diagram "Deployment View"
- quid "3A0B24740291"
- title "Deployment View"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list))))
- properties (object Properties
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "roseId"
- value "753117540")
- (object Attribute
- tool "Ecore"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "Ecore"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "prefix"
- value "")
- (object Attribute
- tool "Ecore"
- name "packageName"
- value "")
- (object Attribute
- tool "Ecore"
- name "basePackage"
- value "")
- (object Attribute
- tool "Ecore"
- name "nsName"
- value "")
- (object Attribute
- tool "Ecore"
- name "nsURI"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "packageName"
- value "")
- (object Attribute
- tool "Ecore"
- name "prefix"
- value "")
- (object Attribute
- tool "Ecore"
- name "basePackage"
- value "")
- (object Attribute
- tool "Ecore"
- name "nsName"
- value "")
- (object Attribute
- tool "Ecore"
- name "nsURI"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "basePackage"
- value "")
- (object Attribute
- tool "Ecore"
- name "prefix"
- value "")
- (object Attribute
- tool "Ecore"
- name "packageName"
- value "")
- (object Attribute
- tool "Ecore"
- name "nsName"
- value "")
- (object Attribute
- tool "Ecore"
- name "nsURI"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "nsName"
- value "")
- (object Attribute
- tool "Ecore"
- name "prefix"
- value "")
- (object Attribute
- tool "Ecore"
- name "packageName"
- value "")
- (object Attribute
- tool "Ecore"
- name "basePackage"
- value "")
- (object Attribute
- tool "Ecore"
- name "nsURI"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "nsURI"
- value "")
- (object Attribute
- tool "Ecore"
- name "prefix"
- value "")
- (object Attribute
- tool "Ecore"
- name "packageName"
- value "")
- (object Attribute
- tool "Ecore"
- name "basePackage"
- value "")
- (object Attribute
- tool "Ecore"
- name "nsName"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isVolatile"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isChangeable"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isUnsettable"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isUnique"
- value TRUE)))
- (object Attribute
- tool "Ecore"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isVolatile"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isChangeable"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isUnsettable"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isResolveProxies"
- value TRUE)))
- (object Attribute
- tool "Cplusplus"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "Cplusplus"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "Const"
- value FALSE)
- (object Attribute
- tool "Cplusplus"
- name "InitialValue"
- value "")))
- (object Attribute
- tool "Cplusplus"
- name "default__Inherit"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)))
- (object Attribute
- tool "Cplusplus"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "Copyright"
- value (value Text ""))
- (object Attribute
- tool "Cplusplus"
- name "RootPackage"
- value "C++ Reverse Engineered")
- (object Attribute
- tool "Cplusplus"
- name "InitialHeaderIncludes"
- value (value Text ""))
- (object Attribute
- tool "Cplusplus"
- name "InitialBodyIncludes"
- value (value Text ""))
- (object Attribute
- tool "Cplusplus"
- name "RevEngRootDirectory"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "RevEngDirectoriesAsPackages"
- value FALSE)
- (object Attribute
- tool "Cplusplus"
- name "HeaderFileExtension"
- value ".h")
- (object Attribute
- tool "Cplusplus"
- name "ImplementationFileExtension"
- value ".cpp")
- (object Attribute
- tool "Cplusplus"
- name "NewHeaderFileDirectory"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "NewImplementationFileDirectory"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "FileCapitalization"
- value ("FileCapitalizationSet" 0))
- (object Attribute
- tool "Cplusplus"
- name "CodeGenExtraDirectories"
- value ("CodeGenExtraDirectoriesSet" 0))
- (object Attribute
- tool "Cplusplus"
- name "StripClassPrefix"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "UseTabs"
- value FALSE)
- (object Attribute
- tool "Cplusplus"
- name "TabWidth"
- value 8)
- (object Attribute
- tool "Cplusplus"
- name "IndentWidth"
- value 4)
- (object Attribute
- tool "Cplusplus"
- name "AccessIndentation"
- value -2)
- (object Attribute
- tool "Cplusplus"
- name "ModelIdCommentRules"
- value ("ModelIdCommentRulesSet" 1))
- (object Attribute
- tool "Cplusplus"
- name "PageWidth"
- value 80)
- (object Attribute
- tool "Cplusplus"
- name "ClassMemberOrder"
- value ("MemberOrderSet" 1))
- (object Attribute
- tool "Cplusplus"
- name "OneParameterPerLine"
- value FALSE)
- (object Attribute
- tool "Cplusplus"
- name "NamespaceBraceStyle"
- value ("BraceStyleSet" 2))
- (object Attribute
- tool "Cplusplus"
- name "ClassBraceStyle"
- value ("BraceStyleSet" 2))
- (object Attribute
- tool "Cplusplus"
- name "FunctionBraceStyle"
- value ("BraceStyleSet" 2))
- (object Attribute
- tool "Cplusplus"
- name "CodeGenExtraDirectoriesSet"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "None"
- value 0)
- (object Attribute
- tool "Cplusplus"
- name "Namespaces"
- value 1)
- (object Attribute
- tool "Cplusplus"
- name "Packages"
- value 2)))
- (object Attribute
- tool "Cplusplus"
- name "FileCapitalizationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Same as model"
- value 0)
- (object Attribute
- tool "Cplusplus"
- name "Lower case"
- value 1)
- (object Attribute
- tool "Cplusplus"
- name "Upper case"
- value 2)
- (object Attribute
- tool "Cplusplus"
- name "Lower case with underscores"
- value 3)))
- (object Attribute
- tool "Cplusplus"
- name "BraceStyleSet"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "B1"
- value 1)
- (object Attribute
- tool "Cplusplus"
- name "B2"
- value 2)
- (object Attribute
- tool "Cplusplus"
- name "B3"
- value 3)
- (object Attribute
- tool "Cplusplus"
- name "B4"
- value 4)
- (object Attribute
- tool "Cplusplus"
- name "B5"
- value 5)))
- (object Attribute
- tool "Cplusplus"
- name "MemberOrderSet"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Public First"
- value 1)
- (object Attribute
- tool "Cplusplus"
- name "Private First"
- value 2)
- (object Attribute
- tool "Cplusplus"
- name "Order by kind"
- value 3)
- (object Attribute
- tool "Cplusplus"
- name "Unordered"
- value 4)))
- (object Attribute
- tool "Cplusplus"
- name "ModelIdCommentRulesSet"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Code generation only"
- value 1)
- (object Attribute
- tool "Cplusplus"
- name "Code generation and reverse engineering"
- value 2)
- (object Attribute
- tool "Cplusplus"
- name "Never generate model IDs"
- value 3)))
- (object Attribute
- tool "Cplusplus"
- name "CreateBackupFiles"
- value FALSE)
- (object Attribute
- tool "Cplusplus"
- name "CommentRules"
- value ("CommentRulesSet" 1))
- (object Attribute
- tool "Cplusplus"
- name "CommentRulesSet"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Always synchronize"
- value 1)
- (object Attribute
- tool "Cplusplus"
- name "Code generation only"
- value 2)
- (object Attribute
- tool "Cplusplus"
- name "Reverse engineering only"
- value 3)
- (object Attribute
- tool "Cplusplus"
- name "Never synchronize"
- value 4)))))
- (object Attribute
- tool "Cplusplus"
- name "default__Param"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")))
- (object Attribute
- tool "Cplusplus"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")))
- (object Attribute
- tool "Cplusplus"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "InitialCodeBody"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "Inline"
- value FALSE)
- (object Attribute
- tool "Cplusplus"
- name "GenerateFunctionBody"
- value ("GenerateFunctionBodySet" 2))
- (object Attribute
- tool "Cplusplus"
- name "GenerateFunctionBodySet"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Default"
- value 2)
- (object Attribute
- tool "Cplusplus"
- name "True"
- value 1)
- (object Attribute
- tool "Cplusplus"
- name "False"
- value 0)))))
- (object Attribute
- tool "Cplusplus"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "ImplementationType"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "HeaderSourceFile"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "BodySourceFile"
- value "")))
- (object Attribute
- tool "Cplusplus"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "IsNamespace"
- value FALSE)))
- (object Attribute
- tool "Cplusplus"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "ANSI C++ Event Watcher"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "ANSIConvert"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "propertyId"
- value "838326200")
- (object Attribute
- tool "Ada83"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "SpecFileExtension"
- value "1.ada")
- (object Attribute
- tool "Ada83"
- name "SpecFileBackupExtension"
- value "1.ad~")
- (object Attribute
- tool "Ada83"
- name "SpecFileTemporaryExtension"
- value "1.ad#")
- (object Attribute
- tool "Ada83"
- name "BodyFileExtension"
- value "2.ada")
- (object Attribute
- tool "Ada83"
- name "BodyFileBackupExtension"
- value "2.ad~")
- (object Attribute
- tool "Ada83"
- name "BodyFileTemporaryExtension"
- value "2.ad#")
- (object Attribute
- tool "Ada83"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "GenerateBodies"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "GenerateAccessorOperations"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "GenerateStandardOperations"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "ImplicitParameter"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "CommentWidth"
- value 60)
- (object Attribute
- tool "Ada83"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "Ada83"
- name "UseFileName"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "Directory"
- value "$ROSEADA83_SOURCE")
- (object Attribute
- tool "Ada83"
- name "DefaultCodeBody"
- value "[statement]")))
- (object Attribute
- tool "Ada83"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "ClassName"
- value "Object")
- (object Attribute
- tool "Ada83"
- name "ClassAccess"
- value ("ImplementationSet" 43))
- (object Attribute
- tool "Ada83"
- name "ImplementationType"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "IsSubtype"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "PolymorphicUnit"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "HandleName"
- value "Handle")
- (object Attribute
- tool "Ada83"
- name "HandleAccess"
- value ("ImplementationSet" 45))
- (object Attribute
- tool "Ada83"
- name "Discriminant"
- value "")
- (object Attribute
- tool "Ada83"
- name "Variant"
- value "")
- (object Attribute
- tool "Ada83"
- name "EnumerationLiteralPrefix"
- value "A_")
- (object Attribute
- tool "Ada83"
- name "RecordFieldPrefix"
- value "The_")
- (object Attribute
- tool "Ada83"
- name "GenerateAccessorOperations"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "GenerateStandardOperations"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "ImplicitParameter"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "ClassParameterName"
- value "This")
- (object Attribute
- tool "Ada83"
- name "DefaultConstructorKind"
- value ("ConstructorKindSet" 199))
- (object Attribute
- tool "Ada83"
- name "DefaultConstructorName"
- value "Create")
- (object Attribute
- tool "Ada83"
- name "InlineDefaultConstructor"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "CopyConstructorKind"
- value ("ConstructorKindSet" 199))
- (object Attribute
- tool "Ada83"
- name "CopyConstructorName"
- value "Copy")
- (object Attribute
- tool "Ada83"
- name "InlineCopyConstructor"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "DestructorName"
- value "Free")
- (object Attribute
- tool "Ada83"
- name "InlineDestructor"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "ClassEqualityOperation"
- value "")
- (object Attribute
- tool "Ada83"
- name "HandleEqualityOperation"
- value "")
- (object Attribute
- tool "Ada83"
- name "InlineEquality"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "IsTask"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "ImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Public"
- value 45)
- (object Attribute
- tool "Ada83"
- name "Private"
- value 43)
- (object Attribute
- tool "Ada83"
- name "LimitedPrivate"
- value 200)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada83"
- name "ConstructorKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada83"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada83"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "FileName"
- value "")
- (object Attribute
- tool "Ada83"
- name "ReturnType"
- value "")
- (object Attribute
- tool "Ada83"
- name "GenericFormalParameters"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "AdditionalWiths"
- value (value Text ""))))
- (object Attribute
- tool "Ada83"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "FileName"
- value "")
- (object Attribute
- tool "Ada83"
- name "ReturnType"
- value "")
- (object Attribute
- tool "Ada83"
- name "AdditionalWiths"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "IsSubunit"
- value FALSE)))
- (object Attribute
- tool "Ada83"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "SubprogramImplementation"
- value ("SubprogramImplementationSet" 2))
- (object Attribute
- tool "Ada83"
- name "ClassParameterMode"
- value ("ParameterModeSet" 203))
- (object Attribute
- tool "Ada83"
- name "Inline"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "EntryCode"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "ExitCode"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "SubprogramImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Spec"
- value 1)
- (object Attribute
- tool "Ada83"
- name "Body"
- value 2)
- (object Attribute
- tool "Ada83"
- name "Renaming"
- value 3)
- (object Attribute
- tool "Ada83"
- name "Separate"
- value 4)))
- (object Attribute
- tool "Ada83"
- name "ParameterModeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "In"
- value 204)
- (object Attribute
- tool "Ada83"
- name "Out"
- value 205)
- (object Attribute
- tool "Ada83"
- name "InOut"
- value 203)
- (object Attribute
- tool "Ada83"
- name "FunctionReturn"
- value 206)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada83"
- name "Renames"
- value "")
- (object Attribute
- tool "Ada83"
- name "InitialCodeBody"
- value "${default}")))
- (object Attribute
- tool "Ada83"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "NameIfUnlabeled"
- value "The_${supplier}")
- (object Attribute
- tool "Ada83"
- name "DataMemberName"
- value "${relationship}")
- (object Attribute
- tool "Ada83"
- name "GetName"
- value "Get_${relationship}")
- (object Attribute
- tool "Ada83"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "SetName"
- value "Set_${relationship}")
- (object Attribute
- tool "Ada83"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada83"
- name "Variant"
- value "")
- (object Attribute
- tool "Ada83"
- name "ContainerGeneric"
- value "List")
- (object Attribute
- tool "Ada83"
- name "ContainerType"
- value "")
- (object Attribute
- tool "Ada83"
- name "ContainerDeclarations"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "SelectorName"
- value "")
- (object Attribute
- tool "Ada83"
- name "SelectorType"
- value "")
- (object Attribute
- tool "Ada83"
- name "Declare"
- value ("DeclareSet" 234))
- (object Attribute
- tool "Ada83"
- name "DeclareSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Before"
- value 233)
- (object Attribute
- tool "Ada83"
- name "After"
- value 234)))))
- (object Attribute
- tool "Ada83"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "DataMemberName"
- value "${attribute}")
- (object Attribute
- tool "Ada83"
- name "GetName"
- value "Get_${attribute}")
- (object Attribute
- tool "Ada83"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "SetName"
- value "Set_${attribute}")
- (object Attribute
- tool "Ada83"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada83"
- name "Variant"
- value "")
- (object Attribute
- tool "Ada83"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "Declare"
- value ("DeclareSet" 234))
- (object Attribute
- tool "Ada83"
- name "DeclareSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Before"
- value 233)
- (object Attribute
- tool "Ada83"
- name "After"
- value 234)))))
- (object Attribute
- tool "Ada83"
- name "default__Association"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "NameIfUnlabeled"
- value "The_${targetClass}")
- (object Attribute
- tool "Ada83"
- name "GetName"
- value "Get_${association}")
- (object Attribute
- tool "Ada83"
- name "InlineGet"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "SetName"
- value "Set_${association}")
- (object Attribute
- tool "Ada83"
- name "InlineSet"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "GenerateAssociate"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada83"
- name "AssociateName"
- value "Associate")
- (object Attribute
- tool "Ada83"
- name "InlineAssociate"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "GenerateDissociate"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada83"
- name "DissociateName"
- value "Dissociate")
- (object Attribute
- tool "Ada83"
- name "InlineDissociate"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada83"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada83"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "NameIfUnlabeled"
- value "The_${targetClass}")
- (object Attribute
- tool "Ada83"
- name "DataMemberName"
- value "${target}")
- (object Attribute
- tool "Ada83"
- name "GetName"
- value "Get_${target}")
- (object Attribute
- tool "Ada83"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "SetName"
- value "Set_${target}")
- (object Attribute
- tool "Ada83"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada83"
- name "ContainerGeneric"
- value "List")
- (object Attribute
- tool "Ada83"
- name "ContainerType"
- value "")
- (object Attribute
- tool "Ada83"
- name "ContainerDeclarations"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "SelectorName"
- value "")
- (object Attribute
- tool "Ada83"
- name "SelectorType"
- value "")
- (object Attribute
- tool "Ada83"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada83"
- name "Declare"
- value ("DeclareSet" 234))
- (object Attribute
- tool "Ada83"
- name "DeclareSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Before"
- value 233)
- (object Attribute
- tool "Ada83"
- name "After"
- value 234)))
- (object Attribute
- tool "Ada83"
- name "Representation"
- value (value Text ""))))
- (object Attribute
- tool "Ada83"
- name "default__Subsystem"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Directory"
- value "AUTO GENERATE")))
- (object Attribute
- tool "Ada83"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "propertyId"
- value "838326200")
- (object Attribute
- tool "Ada95"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "SpecFileExtension"
- value "1.ada")
- (object Attribute
- tool "Ada95"
- name "SpecFileBackupExtension"
- value "1.ad~")
- (object Attribute
- tool "Ada95"
- name "SpecFileTemporaryExtension"
- value "1.ad#")
- (object Attribute
- tool "Ada95"
- name "BodyFileExtension"
- value "2.ada")
- (object Attribute
- tool "Ada95"
- name "BodyFileBackupExtension"
- value "2.ad~")
- (object Attribute
- tool "Ada95"
- name "BodyFileTemporaryExtension"
- value "2.ad#")
- (object Attribute
- tool "Ada95"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "UseColonNotation"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateBodies"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateAccessorOperations"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateStandardOperations"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "ImplicitParameter"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "CommentWidth"
- value 60)
- (object Attribute
- tool "Ada95"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "Ada95"
- name "UseFileName"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "Directory"
- value "$ROSEADA95_SOURCE")
- (object Attribute
- tool "Ada95"
- name "DefaultCodeBody"
- value "[statement]")))
- (object Attribute
- tool "Ada95"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "TypeName"
- value "Object")
- (object Attribute
- tool "Ada95"
- name "TypeVisibility"
- value ("TypeVisibilitySet" 43))
- (object Attribute
- tool "Ada95"
- name "TypeImplementation"
- value ("TypeImplementationSet" 208))
- (object Attribute
- tool "Ada95"
- name "TypeControl"
- value ("TypeControlSet" 225))
- (object Attribute
- tool "Ada95"
- name "TypeControlName"
- value "Controlled_${type}")
- (object Attribute
- tool "Ada95"
- name "TypeDefinition"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "RecordImplementation"
- value ("RecordImplementationSet" 209))
- (object Attribute
- tool "Ada95"
- name "RecordKindPackageName"
- value "${class}_Record_Kinds")
- (object Attribute
- tool "Ada95"
- name "IsLimited"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "IsSubtype"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateAccessType"
- value ("GenerateAccessTypeSet" 230))
- (object Attribute
- tool "Ada95"
- name "AccessTypeName"
- value "Handle")
- (object Attribute
- tool "Ada95"
- name "AccessTypeVisibility"
- value ("TypeVisibilitySet" 45))
- (object Attribute
- tool "Ada95"
- name "AccessTypeDefinition"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "AccessClassWide"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "MaybeAliased"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "ParameterizedImplementation"
- value ("ParameterizedImplementationSet" 11))
- (object Attribute
- tool "Ada95"
- name "ParentClassName"
- value "Superclass")
- (object Attribute
- tool "Ada95"
- name "EnumerationLiteralPrefix"
- value "A_")
- (object Attribute
- tool "Ada95"
- name "RecordFieldPrefix"
- value "The_")
- (object Attribute
- tool "Ada95"
- name "ArrayOfTypeName"
- value "Array_Of_${type}")
- (object Attribute
- tool "Ada95"
- name "AccessArrayOfTypeName"
- value "Access_Array_Of_${type}")
- (object Attribute
- tool "Ada95"
- name "ArrayOfAccessTypeName"
- value "Array_Of_${access_type}")
- (object Attribute
- tool "Ada95"
- name "AccessArrayOfAccessTypeName"
- value "Access_Array_Of_${access_type}")
- (object Attribute
- tool "Ada95"
- name "ArrayIndexDefinition"
- value "Positive range <>")
- (object Attribute
- tool "Ada95"
- name "GenerateAccessorOperations"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateStandardOperations"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "ImplicitParameter"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "ImplicitParameterName"
- value "This")
- (object Attribute
- tool "Ada95"
- name "GenerateDefaultConstructor"
- value ("SubprogramKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "DefaultConstructorName"
- value "Create")
- (object Attribute
- tool "Ada95"
- name "InlineDefaultConstructor"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateCopyConstructor"
- value ("SubprogramKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "CopyConstructorName"
- value "Copy")
- (object Attribute
- tool "Ada95"
- name "InlineCopyConstructor"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateDestructor"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "DestructorName"
- value "Free")
- (object Attribute
- tool "Ada95"
- name "InlineDestructor"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateTypeEquality"
- value ("FunctionKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "TypeEqualityName"
- value "${quote}=${quote}")
- (object Attribute
- tool "Ada95"
- name "InlineEquality"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "TypeImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Tagged"
- value 208)
- (object Attribute
- tool "Ada95"
- name "Record"
- value 210)
- (object Attribute
- tool "Ada95"
- name "Mixin"
- value 211)
- (object Attribute
- tool "Ada95"
- name "Protected"
- value 44)
- (object Attribute
- tool "Ada95"
- name "Task"
- value 212)))
- (object Attribute
- tool "Ada95"
- name "RecordImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "SingleType"
- value 209)
- (object Attribute
- tool "Ada95"
- name "MultipleTypes"
- value 213)))
- (object Attribute
- tool "Ada95"
- name "ParameterizedImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Generic"
- value 11)
- (object Attribute
- tool "Ada95"
- name "Unconstrained"
- value 214)))
- (object Attribute
- tool "Ada95"
- name "TypeVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Public"
- value 45)
- (object Attribute
- tool "Ada95"
- name "Private"
- value 43)))
- (object Attribute
- tool "Ada95"
- name "SubprogramKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "TypeControlSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "None"
- value 225)
- (object Attribute
- tool "Ada95"
- name "InitializationOnly"
- value 226)
- (object Attribute
- tool "Ada95"
- name "AssignmentFinalizationOnly"
- value 227)
- (object Attribute
- tool "Ada95"
- name "All"
- value 228)))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Always"
- value 229)
- (object Attribute
- tool "Ada95"
- name "Auto"
- value 230)))
- (object Attribute
- tool "Ada95"
- name "IncompleteType"
- value ("IncompleteTypeSet" 1))
- (object Attribute
- tool "Ada95"
- name "TypeControlVisibility"
- value ("TypeVisibilitySet" 43))
- (object Attribute
- tool "Ada95"
- name "IncompleteTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "DoNotDeclare"
- value 1)
- (object Attribute
- tool "Ada95"
- name "NoDiscriminantPart"
- value 2)
- (object Attribute
- tool "Ada95"
- name "UnknownDiscriminantPart"
- value 3)
- (object Attribute
- tool "Ada95"
- name "KnownDiscriminantPart"
- value 4)))))
- (object Attribute
- tool "Ada95"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "FileName"
- value "")
- (object Attribute
- tool "Ada95"
- name "ReturnType"
- value "")
- (object Attribute
- tool "Ada95"
- name "GenericFormalParameters"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "AdditionalWiths"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "IsPrivate"
- value FALSE)))
- (object Attribute
- tool "Ada95"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "FileName"
- value "")
- (object Attribute
- tool "Ada95"
- name "ReturnType"
- value "")
- (object Attribute
- tool "Ada95"
- name "AdditionalWiths"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "IsSubunit"
- value FALSE)))
- (object Attribute
- tool "Ada95"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "SubprogramImplementation"
- value ("SubprogramImplementationSet" 2))
- (object Attribute
- tool "Ada95"
- name "Renames"
- value "")
- (object Attribute
- tool "Ada95"
- name "GenerateOverriding"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "ImplicitParameterMode"
- value ("ParameterModeSet" 203))
- (object Attribute
- tool "Ada95"
- name "ImplicitParameterClassWide"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateAccessOperation"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "Inline"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "EntryCode"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "ExitCode"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "EntryBarrierCondition"
- value "True")
- (object Attribute
- tool "Ada95"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "SubprogramImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Spec"
- value 1)
- (object Attribute
- tool "Ada95"
- name "Body"
- value 2)
- (object Attribute
- tool "Ada95"
- name "Abstract"
- value 3)
- (object Attribute
- tool "Ada95"
- name "Renaming"
- value 4)
- (object Attribute
- tool "Ada95"
- name "RenamingAsBody"
- value 5)
- (object Attribute
- tool "Ada95"
- name "Separate"
- value 6)))
- (object Attribute
- tool "Ada95"
- name "ParameterModeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "In"
- value 204)
- (object Attribute
- tool "Ada95"
- name "Out"
- value 205)
- (object Attribute
- tool "Ada95"
- name "InOut"
- value 203)
- (object Attribute
- tool "Ada95"
- name "Access"
- value 220)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "InitialCodeBody"
- value "${default}")))
- (object Attribute
- tool "Ada95"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "NameIfUnlabeled"
- value "The_${supplier}")
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementation"
- value ("RecordFieldImplementationSet" 216))
- (object Attribute
- tool "Ada95"
- name "RecordFieldName"
- value "${relationship}")
- (object Attribute
- tool "Ada95"
- name "GenerateGet"
- value ("FunctionKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessGet"
- value ("FunctionKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "GetName"
- value "Get_${relationship}")
- (object Attribute
- tool "Ada95"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateSet"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessSet"
- value ("ProcedureKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "SetName"
- value "Set_${relationship}")
- (object Attribute
- tool "Ada95"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "IsAliased"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada95"
- name "ContainerImplementation"
- value ("ContainerImplementationSet" 217))
- (object Attribute
- tool "Ada95"
- name "ContainerGeneric"
- value "List")
- (object Attribute
- tool "Ada95"
- name "ContainerType"
- value "")
- (object Attribute
- tool "Ada95"
- name "ContainerDeclarations"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "SelectorName"
- value "")
- (object Attribute
- tool "Ada95"
- name "SelectorType"
- value "")
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Component"
- value 216)
- (object Attribute
- tool "Ada95"
- name "Discriminant"
- value 218)
- (object Attribute
- tool "Ada95"
- name "AccessDiscriminant"
- value 219)))
- (object Attribute
- tool "Ada95"
- name "ContainerImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Array"
- value 217)
- (object Attribute
- tool "Ada95"
- name "Generic"
- value 11)))
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "Declare"
- value ("DeclareSet" 234))
- (object Attribute
- tool "Ada95"
- name "DeclareSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Before"
- value 233)
- (object Attribute
- tool "Ada95"
- name "After"
- value 234)))
- (object Attribute
- tool "Ada95"
- name "AccessDiscriminantClassWide"
- value FALSE)))
- (object Attribute
- tool "Ada95"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementation"
- value ("RecordFieldImplementationSet" 216))
- (object Attribute
- tool "Ada95"
- name "RecordFieldName"
- value "${attribute}")
- (object Attribute
- tool "Ada95"
- name "GenerateGet"
- value ("FunctionKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessGet"
- value ("FunctionKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "GetName"
- value "Get_${attribute}")
- (object Attribute
- tool "Ada95"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateSet"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessSet"
- value ("ProcedureKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "SetName"
- value "Set_${attribute}")
- (object Attribute
- tool "Ada95"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "IsAliased"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada95"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Component"
- value 216)
- (object Attribute
- tool "Ada95"
- name "Discriminant"
- value 218)
- (object Attribute
- tool "Ada95"
- name "AccessDiscriminant"
- value 219)))
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "Declare"
- value ("DeclareSet" 234))
- (object Attribute
- tool "Ada95"
- name "DeclareSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Before"
- value 233)
- (object Attribute
- tool "Ada95"
- name "After"
- value 234)))
- (object Attribute
- tool "Ada95"
- name "AccessDiscriminantClassWide"
- value FALSE)))
- (object Attribute
- tool "Ada95"
- name "default__Association"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "NameIfUnlabeled"
- value "The_${targetClass}")
- (object Attribute
- tool "Ada95"
- name "GenerateGet"
- value ("FunctionKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "GetName"
- value "Get_${association}")
- (object Attribute
- tool "Ada95"
- name "InlineGet"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateSet"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "SetName"
- value "Set_${association}")
- (object Attribute
- tool "Ada95"
- name "InlineSet"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateAssociate"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "AssociateName"
- value "Associate")
- (object Attribute
- tool "Ada95"
- name "InlineAssociate"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateDissociate"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "DissociateName"
- value "Dissociate")
- (object Attribute
- tool "Ada95"
- name "InlineDissociate"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada95"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "NameIfUnlabeled"
- value "The_${targetClass}")
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementation"
- value ("RecordFieldImplementationSet" 216))
- (object Attribute
- tool "Ada95"
- name "RecordFieldName"
- value "${target}")
- (object Attribute
- tool "Ada95"
- name "GenerateGet"
- value ("FunctionKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessGet"
- value ("FunctionKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "GetName"
- value "Get_${target}")
- (object Attribute
- tool "Ada95"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateSet"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessSet"
- value ("ProcedureKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "SetName"
- value "Set_${target}")
- (object Attribute
- tool "Ada95"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "IsAliased"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada95"
- name "ContainerImplementation"
- value ("ContainerImplementationSet" 217))
- (object Attribute
- tool "Ada95"
- name "ContainerGeneric"
- value "List")
- (object Attribute
- tool "Ada95"
- name "ContainerType"
- value "")
- (object Attribute
- tool "Ada95"
- name "ContainerDeclarations"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "SelectorName"
- value "")
- (object Attribute
- tool "Ada95"
- name "SelectorType"
- value "")
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Component"
- value 216)
- (object Attribute
- tool "Ada95"
- name "Discriminant"
- value 218)
- (object Attribute
- tool "Ada95"
- name "AccessDiscriminant"
- value 219)))
- (object Attribute
- tool "Ada95"
- name "ContainerImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Array"
- value 217)
- (object Attribute
- tool "Ada95"
- name "Generic"
- value 11)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "Declare"
- value ("DeclareSet" 234))
- (object Attribute
- tool "Ada95"
- name "DeclareSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Before"
- value 233)
- (object Attribute
- tool "Ada95"
- name "After"
- value 234)))
- (object Attribute
- tool "Ada95"
- name "AccessDiscriminantClassWide"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "Representation"
- value (value Text ""))))
- (object Attribute
- tool "Ada95"
- name "default__Subsystem"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Directory"
- value "AUTO GENERATE")))
- (object Attribute
- tool "Ada95"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "CORBA"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "CORBA"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "CORBA"
- name "Editor"
- value ("EditorType" 100))
- (object Attribute
- tool "CORBA"
- name "IncludePath"
- value "")
- (object Attribute
- tool "CORBA"
- name "StopOnError"
- value TRUE)
- (object Attribute
- tool "CORBA"
- name "EditorType"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "BuiltIn"
- value 100)
- (object Attribute
- tool "CORBA"
- name "WindowsShell"
- value 101)))
- (object Attribute
- tool "CORBA"
- name "PathSeparator"
- value "")))
- (object Attribute
- tool "CORBA"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "ArrayDimensions"
- value "")
- (object Attribute
- tool "CORBA"
- name "ConstValue"
- value "")
- (object Attribute
- tool "CORBA"
- name "ImplementationType"
- value "")))
- (object Attribute
- tool "CORBA"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "CORBA"
- name "CmIdentification"
- value (value Text " %X% %Q% %Z% %W%"))
- (object Attribute
- tool "CORBA"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "CORBA"
- name "InclusionProtectionSymbol"
- value "AUTO GENERATE")))
- (object Attribute
- tool "CORBA"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "CORBA"
- name "CmIdentification"
- value (value Text " %X% %Q% %Z% %W%"))
- (object Attribute
- tool "CORBA"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "CORBA"
- name "InclusionProtectionSymbol"
- value "AUTO GENERATE")))
- (object Attribute
- tool "CORBA"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "Context"
- value "")
- (object Attribute
- tool "CORBA"
- name "OperationIsOneWay"
- value FALSE)))
- (object Attribute
- tool "CORBA"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "ArrayDimensions"
- value "")
- (object Attribute
- tool "CORBA"
- name "CaseSpecifier"
- value "")
- (object Attribute
- tool "CORBA"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "CORBA"
- name "Order"
- value "")))
- (object Attribute
- tool "CORBA"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "ArrayDimensions"
- value "")
- (object Attribute
- tool "CORBA"
- name "CaseSpecifier"
- value "")
- (object Attribute
- tool "CORBA"
- name "GenerateForwardReference"
- value FALSE)
- (object Attribute
- tool "CORBA"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "CORBA"
- name "Order"
- value "")
- (object Attribute
- tool "CORBA"
- name "BoundedRoleType"
- value ("AssocTypeSet" 47))
- (object Attribute
- tool "CORBA"
- name "AssocTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "Array"
- value 24)
- (object Attribute
- tool "CORBA"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "CORBA"
- name "default__Uses"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "GenerateForwardReference"
- value FALSE)))
- (object Attribute
- tool "CORBA"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "Data Modeler"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "project"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TableCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "DomainCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "SPPackageCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "TriggerCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "IndexCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "ConstraintCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "StoreProcedureCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "PrimaryKeyCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "ForeignKeyCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "TablePrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DomainPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TriggerPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IndexPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ConstraintPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "StoreProcedurePrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "PrimaryKeyPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ForeignKeyPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ViewCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "JoinCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "TableSpaceCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "cONTAINERCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "ViewPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TableSpacePrefix"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsDatabase"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "TargetDatabase"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Location"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsTableSpace"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "TableSpaceType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsDeault"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "BufferPool"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ExtentSize"
- value 1)
- (object Attribute
- tool "Data Modeler"
- name "PrefetchSize"
- value 1)
- (object Attribute
- tool "Data Modeler"
- name "PageSize"
- value 4)
- (object Attribute
- tool "Data Modeler"
- name "ManagedBy"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ContainerList"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "dmSchema"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "dmDomainPackage"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsSchema"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsDomainPackage"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsRootSchema"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsRootDomainPackage"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsSchemaPackage"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DatabaseID"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DBMS"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsTable"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsView"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsDomain"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsSPPackage"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "Synonymns"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TableSpace"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceId"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SelectClause"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsUpdatable"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "CheckOption"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "PersistToServer"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TableSpaceID"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "CorrelationName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsUpdateable"
- value TRUE)
- (object Attribute
- tool "Data Modeler"
- name "IsSnapShot"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsDistinct"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsPackage"
- value FALSE)))
- (object Attribute
- tool "Data Modeler"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Ordinal"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "IsIdentity"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsUnique"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "NullsAllowed"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "Length"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "Scale"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "ColumnType"
- value "Native")
- (object Attribute
- tool "Data Modeler"
- name "ForBitData"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DefaultValueType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DefaultValue"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceId"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "OID"
- value FALSE)))
- (object Attribute
- tool "Data Modeler"
- name "default__Association"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsRelationship"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "SourceId"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "RIMethod"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ParentUpdateRule"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ParentUpdateRuleName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ParentDeleteRule"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ParentDeleteRuleName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ChildInsertRestrict"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ChildInsertRestrictName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ChildMultiplicity"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ChildMultiplicityName"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ConstraintName"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsConstraint"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ConstraintType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsIndex"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsTrigger"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsStoredProcedure"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsCluster"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "TableSpace"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "FillFactor"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "KeyList"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "CheckPredicate"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsUnique"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DeferalMode"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "InitialCheckTime"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TriggerType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsInsertEvent"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsUpdateEvent"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsDeleteEvent"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "RefOldTable"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "RefNewTable"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "RefOldRow"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "RefNewRow"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsRow"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "WhenClause"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Language"
- value "SQL")
- (object Attribute
- tool "Data Modeler"
- name "ProcType"
- value "Procedure")
- (object Attribute
- tool "Data Modeler"
- name "IsDeterministic"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ParameterStyle"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ReturnedNull"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ExternalName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Length"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Scale"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ForBitData"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DefaultValue"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DefaultValueType"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Parameter"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsInParameter"
- value TRUE)
- (object Attribute
- tool "Data Modeler"
- name "IsOutParameter"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "Ordinal"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Length"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Scale"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ForBitData"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DefaultValueType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DefaultValue"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "OperationID"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Data Modeler Communicator"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "framework"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Java"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "Java"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "RootDir"
- value "")
- (object Attribute
- tool "Java"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "Java"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "Java"
- name "UsePrefixes"
- value FALSE)
- (object Attribute
- tool "Java"
- name "AutoSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ShowCodegenDlg"
- value FALSE)
- (object Attribute
- tool "Java"
- name "JavadocDefaultAuthor"
- value "")
- (object Attribute
- tool "Java"
- name "JavadocDefaultVersion"
- value "")
- (object Attribute
- tool "Java"
- name "JavadocDefaultSince"
- value "")
- (object Attribute
- tool "Java"
- name "JavadocNumAsterisks"
- value 0)
- (object Attribute
- tool "Java"
- name "MaxNumChars"
- value 80)
- (object Attribute
- tool "Java"
- name "Editor"
- value ("EditorType" 100))
- (object Attribute
- tool "Java"
- name "VM"
- value ("VMType" 200))
- (object Attribute
- tool "Java"
- name "ClassPath"
- value "")
- (object Attribute
- tool "Java"
- name "EditorType"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "BuiltIn"
- value 100)
- (object Attribute
- tool "Java"
- name "WindowsShell"
- value 101)))
- (object Attribute
- tool "Java"
- name "VMType"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Sun"
- value 200)
- (object Attribute
- tool "Java"
- name "Microsoft"
- value 201)
- (object Attribute
- tool "Java"
- name "IBM"
- value 202)))
- (object Attribute
- tool "Java"
- name "InstanceVariablePrefix"
- value "m_")
- (object Attribute
- tool "Java"
- name "ClassVariablePrefix"
- value "s_")
- (object Attribute
- tool "Java"
- name "DefaultAttributeDataType"
- value "int")
- (object Attribute
- tool "Java"
- name "DefaultOperationReturnType"
- value "void")
- (object Attribute
- tool "Java"
- name "NoClassCustomDlg"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GlobalImports"
- value (value Text ""))
- (object Attribute
- tool "Java"
- name "OpenBraceClassStyle"
- value TRUE)
- (object Attribute
- tool "Java"
- name "OpenBraceMethodStyle"
- value TRUE)
- (object Attribute
- tool "Java"
- name "UseTabs"
- value FALSE)
- (object Attribute
- tool "Java"
- name "UseSpaces"
- value TRUE)
- (object Attribute
- tool "Java"
- name "SpacingItems"
- value 3)
- (object Attribute
- tool "Java"
- name "RoseDefaultCommentStyle"
- value TRUE)
- (object Attribute
- tool "Java"
- name "AsteriskCommentStyle"
- value FALSE)
- (object Attribute
- tool "Java"
- name "JavaCommentStyle"
- value FALSE)
- (object Attribute
- tool "Java"
- name "JavadocAuthor"
- value FALSE)
- (object Attribute
- tool "Java"
- name "JavadocSince"
- value FALSE)
- (object Attribute
- tool "Java"
- name "JavadocVersion"
- value FALSE)
- (object Attribute
- tool "Java"
- name "NotShowRoseIDDlg"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateRoseID"
- value TRUE)
- (object Attribute
- tool "Java"
- name "GenerateDefaultReturnLine"
- value TRUE)
- (object Attribute
- tool "Java"
- name "UserDefineTagName1"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagApply1"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagText1"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagName2"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagApply2"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagText2"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagName3"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagApply3"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagText3"
- value "")
- (object Attribute
- tool "Java"
- name "ReferenceClasspath"
- value "")
- (object Attribute
- tool "Java"
- name "VAJavaWorkingFolder"
- value "")
- (object Attribute
- tool "Java"
- name "BeanPrefix"
- value "")
- (object Attribute
- tool "Java"
- name "BeanSuffix"
- value "")
- (object Attribute
- tool "Java"
- name "RemotePrefix"
- value "")
- (object Attribute
- tool "Java"
- name "RemoteSuffix"
- value "")
- (object Attribute
- tool "Java"
- name "HomePrefix"
- value "")
- (object Attribute
- tool "Java"
- name "HomeSuffix"
- value "")
- (object Attribute
- tool "Java"
- name "PrimaryKeyPrefix"
- value "")
- (object Attribute
- tool "Java"
- name "PrimaryKeySuffix"
- value "")
- (object Attribute
- tool "Java"
- name "EJBDTDLocation"
- value "")
- (object Attribute
- tool "Java"
- name "ServletDTDLocation"
- value "")
- (object Attribute
- tool "Java"
- name "DefaultEJBVersion"
- value "")
- (object Attribute
- tool "Java"
- name "DefaultServletVersion"
- value "")
- (object Attribute
- tool "Java"
- name "GenerateDefaultJ2EEJavadoc"
- value TRUE)
- (object Attribute
- tool "Java"
- name "UserDefineJavaDocTags"
- value "")
- (object Attribute
- tool "Java"
- name "LocalPrefix"
- value "")
- (object Attribute
- tool "Java"
- name "LocalSuffix"
- value "")
- (object Attribute
- tool "Java"
- name "LocalHomePrefix"
- value "")
- (object Attribute
- tool "Java"
- name "LocalHomeSuffix"
- value "")
- (object Attribute
- tool "Java"
- name "SourceControl"
- value FALSE)
- (object Attribute
- tool "Java"
- name "SCCSelected"
- value FALSE)
- (object Attribute
- tool "Java"
- name "SCCProjectSourceRoot"
- value "")
- (object Attribute
- tool "Java"
- name "SCCProjectName"
- value "")
- (object Attribute
- tool "Java"
- name "SCCComment"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Static"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateDefaultConstructor"
- value TRUE)
- (object Attribute
- tool "Java"
- name "ConstructorIs"
- value ("Ctor_Set" 62))
- (object Attribute
- tool "Java"
- name "Ctor_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "public"
- value 62)
- (object Attribute
- tool "Java"
- name "protected"
- value 63)
- (object Attribute
- tool "Java"
- name "private"
- value 64)
- (object Attribute
- tool "Java"
- name "package"
- value 65)))
- (object Attribute
- tool "Java"
- name "GenerateFinalizer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateStaticInitializer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateInstanceInitializer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateCode"
- value TRUE)
- (object Attribute
- tool "Java"
- name "DisableAutoSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ReadOnly"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletName"
- value "")
- (object Attribute
- tool "Java"
- name "ServletContextRef"
- value FALSE)
- (object Attribute
- tool "Java"
- name "IsSingleThread"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletInitParameter"
- value "")
- (object Attribute
- tool "Java"
- name "ServletInitParameterNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletIsSecure"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletRequestDispatcher"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletRequestDispatcherPath"
- value "")
- (object Attribute
- tool "Java"
- name "DispatcherInclude"
- value FALSE)
- (object Attribute
- tool "Java"
- name "DispatcherForward"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletSecurityRoles"
- value "")
- (object Attribute
- tool "Java"
- name "ServletgetInfo"
- value "")
- (object Attribute
- tool "Java"
- name "ServletXMLFilePath"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestAttribute"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestAttributesNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForRequestAttributes"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestParameter"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestParameterNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForRequestParameters"
- value "")
- (object Attribute
- tool "Java"
- name "ServletHeader"
- value "")
- (object Attribute
- tool "Java"
- name "ServletHeaderNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForHeaders"
- value "")
- (object Attribute
- tool "Java"
- name "ServletIntHeader"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletDateHeader"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletCookie"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForCookie"
- value "")
- (object Attribute
- tool "Java"
- name "ServletContentType"
- value "")
- (object Attribute
- tool "Java"
- name "GenerateHTML"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Generate_XML_DD"
- value TRUE)
- (object Attribute
- tool "Java"
- name "EJBCmpField"
- value "")
- (object Attribute
- tool "Java"
- name "EJBEnvironmentProperties"
- value "")
- (object Attribute
- tool "Java"
- name "EJBCnxFactory"
- value "")
- (object Attribute
- tool "Java"
- name "EJBReferences"
- value "")
- (object Attribute
- tool "Java"
- name "EJBSecurityRoles"
- value "")
- (object Attribute
- tool "Java"
- name "EJBNameInJAR"
- value "")
- (object Attribute
- tool "Java"
- name "EJBSessionType"
- value ("EJBSessionType_Set" 200))
- (object Attribute
- tool "Java"
- name "EJBSessionType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name ""
- value 200)
- (object Attribute
- tool "Java"
- name "Stateless"
- value 201)
- (object Attribute
- tool "Java"
- name "Stateful"
- value 202)))
- (object Attribute
- tool "Java"
- name "EJBTransactionType"
- value ("EJBTransactionType_Set" 211))
- (object Attribute
- tool "Java"
- name "EJBTransactionType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Container"
- value 211)
- (object Attribute
- tool "Java"
- name "Bean"
- value 212)))
- (object Attribute
- tool "Java"
- name "EJBPersistenceType"
- value ("EJBPersistenceType_Set" 220))
- (object Attribute
- tool "Java"
- name "EJBPersistenceType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name ""
- value 220)
- (object Attribute
- tool "Java"
- name "Bean"
- value 221)
- (object Attribute
- tool "Java"
- name "Container"
- value 222)))
- (object Attribute
- tool "Java"
- name "EJBReentrant"
- value FALSE)
- (object Attribute
- tool "Java"
- name "EJBSessionSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "EJBVersion"
- value ("EJBVersion_Set" 230))
- (object Attribute
- tool "Java"
- name "EJBVersion_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "2.0"
- value 230)
- (object Attribute
- tool "Java"
- name "1.x"
- value 231)))
- (object Attribute
- tool "Java"
- name "EJBXMLFilePath"
- value "")
- (object Attribute
- tool "Java"
- name "BMP_Extend_CMP"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Strictfp"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "Default_Servlet__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "ServletName"
- value "")
- (object Attribute
- tool "Java"
- name "ServletContextRef"
- value FALSE)
- (object Attribute
- tool "Java"
- name "IsSingleThread"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletInitParameter"
- value "")
- (object Attribute
- tool "Java"
- name "ServletInitParameterNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletIsSecure"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletRequestDispatcher"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletRequestDispatcherPath"
- value "")
- (object Attribute
- tool "Java"
- name "DispatcherInclude"
- value FALSE)
- (object Attribute
- tool "Java"
- name "DispatcherForward"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletSecurityRoles"
- value "")
- (object Attribute
- tool "Java"
- name "ServletgetInfo"
- value "")
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Static"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateDefaultConstructor"
- value TRUE)
- (object Attribute
- tool "Java"
- name "ConstructorIs"
- value ("Ctor_Set" 62))
- (object Attribute
- tool "Java"
- name "Ctor_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "public"
- value 62)
- (object Attribute
- tool "Java"
- name "protected"
- value 63)
- (object Attribute
- tool "Java"
- name "private"
- value 64)
- (object Attribute
- tool "Java"
- name "package"
- value 65)))
- (object Attribute
- tool "Java"
- name "GenerateFinalizer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateStaticInitializer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateInstanceInitializer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateCode"
- value TRUE)
- (object Attribute
- tool "Java"
- name "DisableAutoSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ReadOnly"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletXMLFilePath"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestAttribute"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestAttributesNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForRequestAttributes"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestParameter"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestParameterNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForRequestParameters"
- value "")
- (object Attribute
- tool "Java"
- name "ServletHeader"
- value "")
- (object Attribute
- tool "Java"
- name "ServletHeaderNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForHeaders"
- value "")
- (object Attribute
- tool "Java"
- name "ServletIntHeader"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletDateHeader"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletCookie"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForCookie"
- value "")
- (object Attribute
- tool "Java"
- name "ServletContentType"
- value "")
- (object Attribute
- tool "Java"
- name "GenerateHTML"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Generate_XML_DD"
- value TRUE)
- (object Attribute
- tool "Java"
- name "EJBCmpField"
- value "")
- (object Attribute
- tool "Java"
- name "EJBEnvironmentProperties"
- value "")
- (object Attribute
- tool "Java"
- name "EJBCnxFactory"
- value "")
- (object Attribute
- tool "Java"
- name "EJBReferences"
- value "")
- (object Attribute
- tool "Java"
- name "EJBSecurityRoles"
- value "")
- (object Attribute
- tool "Java"
- name "EJBNameInJAR"
- value "")
- (object Attribute
- tool "Java"
- name "EJBSessionType"
- value ("EJBSessionType_Set" 200))
- (object Attribute
- tool "Java"
- name "EJBSessionType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name ""
- value 200)
- (object Attribute
- tool "Java"
- name "Stateless"
- value 201)
- (object Attribute
- tool "Java"
- name "Stateful"
- value 202)))
- (object Attribute
- tool "Java"
- name "EJBTransactionType"
- value ("EJBTransactionType_Set" 211))
- (object Attribute
- tool "Java"
- name "EJBTransactionType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Container"
- value 211)
- (object Attribute
- tool "Java"
- name "Bean"
- value 212)))
- (object Attribute
- tool "Java"
- name "EJBPersistenceType"
- value ("EJBPersistenceType_Set" 220))
- (object Attribute
- tool "Java"
- name "EJBPersistenceType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name ""
- value 220)
- (object Attribute
- tool "Java"
- name "Bean"
- value 221)
- (object Attribute
- tool "Java"
- name "Container"
- value 222)))
- (object Attribute
- tool "Java"
- name "EJBReentrant"
- value FALSE)
- (object Attribute
- tool "Java"
- name "EJBSessionSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "EJBVersion"
- value ("EJBVersion_Set" 230))
- (object Attribute
- tool "Java"
- name "EJBVersion_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "2.0"
- value 230)
- (object Attribute
- tool "Java"
- name "1.x"
- value 231)))
- (object Attribute
- tool "Java"
- name "EJBXMLFilePath"
- value "")
- (object Attribute
- tool "Java"
- name "BMP_Extend_CMP"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Strictfp"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "Http_Servlet__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "ServletRequestAttribute"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestAttributesNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForRequestAttributes"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestParameter"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestParameterNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForRequestParameters"
- value "")
- (object Attribute
- tool "Java"
- name "ServletHeader"
- value "")
- (object Attribute
- tool "Java"
- name "ServletHeaderNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForHeaders"
- value "")
- (object Attribute
- tool "Java"
- name "ServletIntHeader"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletDateHeader"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletCookie"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForCookie"
- value "")
- (object Attribute
- tool "Java"
- name "ServletContentType"
- value "")
- (object Attribute
- tool "Java"
- name "GenerateHTML"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Static"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateDefaultConstructor"
- value TRUE)
- (object Attribute
- tool "Java"
- name "ConstructorIs"
- value ("Ctor_Set" 62))
- (object Attribute
- tool "Java"
- name "Ctor_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "public"
- value 62)
- (object Attribute
- tool "Java"
- name "protected"
- value 63)
- (object Attribute
- tool "Java"
- name "private"
- value 64)
- (object Attribute
- tool "Java"
- name "package"
- value 65)))
- (object Attribute
- tool "Java"
- name "GenerateFinalizer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateStaticInitializer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateInstanceInitializer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateCode"
- value TRUE)
- (object Attribute
- tool "Java"
- name "DisableAutoSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ReadOnly"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletName"
- value "")
- (object Attribute
- tool "Java"
- name "ServletContextRef"
- value FALSE)
- (object Attribute
- tool "Java"
- name "IsSingleThread"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletInitParameter"
- value "")
- (object Attribute
- tool "Java"
- name "ServletInitParameterNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletIsSecure"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletRequestDispatcher"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletRequestDispatcherPath"
- value "")
- (object Attribute
- tool "Java"
- name "DispatcherInclude"
- value FALSE)
- (object Attribute
- tool "Java"
- name "DispatcherForward"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletSecurityRoles"
- value "")
- (object Attribute
- tool "Java"
- name "ServletgetInfo"
- value "")
- (object Attribute
- tool "Java"
- name "ServletXMLFilePath"
- value "")
- (object Attribute
- tool "Java"
- name "Generate_XML_DD"
- value TRUE)
- (object Attribute
- tool "Java"
- name "EJBCmpField"
- value "")
- (object Attribute
- tool "Java"
- name "EJBEnvironmentProperties"
- value "")
- (object Attribute
- tool "Java"
- name "EJBCnxFactory"
- value "")
- (object Attribute
- tool "Java"
- name "EJBReferences"
- value "")
- (object Attribute
- tool "Java"
- name "EJBSecurityRoles"
- value "")
- (object Attribute
- tool "Java"
- name "EJBNameInJAR"
- value "")
- (object Attribute
- tool "Java"
- name "EJBSessionType"
- value ("EJBSessionType_Set" 200))
- (object Attribute
- tool "Java"
- name "EJBSessionType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name ""
- value 200)
- (object Attribute
- tool "Java"
- name "Stateless"
- value 201)
- (object Attribute
- tool "Java"
- name "Stateful"
- value 202)))
- (object Attribute
- tool "Java"
- name "EJBTransactionType"
- value ("EJBTransactionType_Set" 211))
- (object Attribute
- tool "Java"
- name "EJBTransactionType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Container"
- value 211)
- (object Attribute
- tool "Java"
- name "Bean"
- value 212)))
- (object Attribute
- tool "Java"
- name "EJBPersistenceType"
- value ("EJBPersistenceType_Set" 220))
- (object Attribute
- tool "Java"
- name "EJBPersistenceType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name ""
- value 220)
- (object Attribute
- tool "Java"
- name "Bean"
- value 221)
- (object Attribute
- tool "Java"
- name "Container"
- value 222)))
- (object Attribute
- tool "Java"
- name "EJBReentrant"
- value FALSE)
- (object Attribute
- tool "Java"
- name "EJBSessionSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "EJBVersion"
- value ("EJBVersion_Set" 230))
- (object Attribute
- tool "Java"
- name "EJBVersion_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "2.0"
- value 230)
- (object Attribute
- tool "Java"
- name "1.x"
- value 231)))
- (object Attribute
- tool "Java"
- name "EJBXMLFilePath"
- value "")
- (object Attribute
- tool "Java"
- name "BMP_Extend_CMP"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Strictfp"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "Default_EJB__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Generate_XML_DD"
- value TRUE)
- (object Attribute
- tool "Java"
- name "EJBCmpField"
- value "")
- (object Attribute
- tool "Java"
- name "EJBEnvironmentProperties"
- value "")
- (object Attribute
- tool "Java"
- name "EJBCnxFactory"
- value "")
- (object Attribute
- tool "Java"
- name "EJBReferences"
- value "")
- (object Attribute
- tool "Java"
- name "EJBSecurityRoles"
- value "")
- (object Attribute
- tool "Java"
- name "EJBNameInJAR"
- value "")
- (object Attribute
- tool "Java"
- name "EJBSessionType"
- value ("EJBSessionType_Set" 200))
- (object Attribute
- tool "Java"
- name "EJBSessionType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name ""
- value 200)
- (object Attribute
- tool "Java"
- name "Stateless"
- value 201)
- (object Attribute
- tool "Java"
- name "Stateful"
- value 202)))
- (object Attribute
- tool "Java"
- name "EJBTransactionType"
- value ("EJBTransactionType_Set" 211))
- (object Attribute
- tool "Java"
- name "EJBTransactionType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Container"
- value 211)
- (object Attribute
- tool "Java"
- name "Bean"
- value 212)))
- (object Attribute
- tool "Java"
- name "EJBPersistenceType"
- value ("EJBPersistenceType_Set" 220))
- (object Attribute
- tool "Java"
- name "EJBPersistenceType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name ""
- value 220)
- (object Attribute
- tool "Java"
- name "Bean"
- value 221)
- (object Attribute
- tool "Java"
- name "Container"
- value 222)))
- (object Attribute
- tool "Java"
- name "EJBReentrant"
- value FALSE)
- (object Attribute
- tool "Java"
- name "BMP_Extend_CMP"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Static"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateDefaultConstructor"
- value TRUE)
- (object Attribute
- tool "Java"
- name "ConstructorIs"
- value ("Ctor_Set" 62))
- (object Attribute
- tool "Java"
- name "Ctor_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "public"
- value 62)
- (object Attribute
- tool "Java"
- name "protected"
- value 63)
- (object Attribute
- tool "Java"
- name "private"
- value 64)
- (object Attribute
- tool "Java"
- name "package"
- value 65)))
- (object Attribute
- tool "Java"
- name "GenerateFinalizer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateStaticInitializer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateInstanceInitializer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateCode"
- value TRUE)
- (object Attribute
- tool "Java"
- name "DisableAutoSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ReadOnly"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletName"
- value "")
- (object Attribute
- tool "Java"
- name "ServletContextRef"
- value FALSE)
- (object Attribute
- tool "Java"
- name "IsSingleThread"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletInitParameter"
- value "")
- (object Attribute
- tool "Java"
- name "ServletInitParameterNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletIsSecure"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletRequestDispatcher"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletRequestDispatcherPath"
- value "")
- (object Attribute
- tool "Java"
- name "DispatcherInclude"
- value FALSE)
- (object Attribute
- tool "Java"
- name "DispatcherForward"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletSecurityRoles"
- value "")
- (object Attribute
- tool "Java"
- name "ServletgetInfo"
- value "")
- (object Attribute
- tool "Java"
- name "ServletXMLFilePath"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestAttribute"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestAttributesNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForRequestAttributes"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestParameter"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestParameterNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForRequestParameters"
- value "")
- (object Attribute
- tool "Java"
- name "ServletHeader"
- value "")
- (object Attribute
- tool "Java"
- name "ServletHeaderNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForHeaders"
- value "")
- (object Attribute
- tool "Java"
- name "ServletIntHeader"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletDateHeader"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletCookie"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForCookie"
- value "")
- (object Attribute
- tool "Java"
- name "ServletContentType"
- value "")
- (object Attribute
- tool "Java"
- name "GenerateHTML"
- value FALSE)
- (object Attribute
- tool "Java"
- name "EJBSessionSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "EJBVersion"
- value ("EJBVersion_Set" 230))
- (object Attribute
- tool "Java"
- name "EJBVersion_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "2.0"
- value 230)
- (object Attribute
- tool "Java"
- name "1.x"
- value 231)))
- (object Attribute
- tool "Java"
- name "EJBXMLFilePath"
- value "")
- (object Attribute
- tool "Java"
- name "Strictfp"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "CmIdentification"
- value (value Text ""))
- (object Attribute
- tool "Java"
- name "CopyrightNotice"
- value (value Text ""))))
- (object Attribute
- tool "Java"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "CmIdentification"
- value (value Text ""))
- (object Attribute
- tool "Java"
- name "CopyrightNotice"
- value (value Text ""))))
- (object Attribute
- tool "Java"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Abstract"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Static"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Native"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Synchronized"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateFullyQualifiedReturn"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ReplaceExistingCode"
- value TRUE)
- (object Attribute
- tool "Java"
- name "Strictfp"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Transient"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Volatile"
- value FALSE)
- (object Attribute
- tool "Java"
- name "PropertyType"
- value ("BeanProperty_Set" 71))
- (object Attribute
- tool "Java"
- name "BeanProperty_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Not A Property"
- value 71)
- (object Attribute
- tool "Java"
- name "Simple"
- value 72)
- (object Attribute
- tool "Java"
- name "Bound"
- value 73)
- (object Attribute
- tool "Java"
- name "Constrained"
- value 74)))
- (object Attribute
- tool "Java"
- name "IndividualChangeMgt"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Read/Write"
- value ("Read/Write_Set" 81))
- (object Attribute
- tool "Java"
- name "Read/Write_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Read & Write"
- value 81)
- (object Attribute
- tool "Java"
- name "Read Only"
- value 82)
- (object Attribute
- tool "Java"
- name "Write Only"
- value 83)))
- (object Attribute
- tool "Java"
- name "GenerateFullyQualifiedTypes"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "ContainerClass"
- value "")
- (object Attribute
- tool "Java"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Transient"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Volatile"
- value FALSE)
- (object Attribute
- tool "Java"
- name "PropertyType"
- value ("BeanProperty_Set" 71))
- (object Attribute
- tool "Java"
- name "BeanProperty_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Not A Property"
- value 71)
- (object Attribute
- tool "Java"
- name "Simple"
- value 72)
- (object Attribute
- tool "Java"
- name "Bound"
- value 73)
- (object Attribute
- tool "Java"
- name "Constrained"
- value 74)))
- (object Attribute
- tool "Java"
- name "IndividualChangeMgt"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Read/Write"
- value ("Read/Write_Set" 81))
- (object Attribute
- tool "Java"
- name "Read/Write_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Read & Write"
- value 81)
- (object Attribute
- tool "Java"
- name "Read Only"
- value 82)
- (object Attribute
- tool "Java"
- name "Write Only"
- value 83)))
- (object Attribute
- tool "Java"
- name "GenerateFullyQualifiedTypes"
- value FALSE)
- (object Attribute
- tool "Java"
- name "IsNavigable"
- value TRUE)))
- (object Attribute
- tool "Java"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "propertyId"
- value "360000002")
- (object Attribute
- tool "Oracle8"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "DDLScriptFilename"
- value "DDL1.SQL")
- (object Attribute
- tool "Oracle8"
- name "DropClause"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "PrimaryKeyColumnName"
- value "_ID")
- (object Attribute
- tool "Oracle8"
- name "PrimaryKeyColumnType"
- value "NUMBER(5,0)")
- (object Attribute
- tool "Oracle8"
- name "SchemaNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "SchemaNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TableNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TableNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TypeNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TypeNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ViewNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ViewNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "VarrayNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "VarrayNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "NestedTableNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "NestedTableNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ObjectTableNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ObjectTableNameSuffix"
- value "")))
- (object Attribute
- tool "Oracle8"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "IsSchema"
- value FALSE)))
- (object Attribute
- tool "Oracle8"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "OID"
- value "")
- (object Attribute
- tool "Oracle8"
- name "WhereClause"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CheckConstraint"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionTypeLength"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionTypePrecision"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionTypeScale"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionOfREFS"
- value FALSE)))
- (object Attribute
- tool "Oracle8"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "MethodKind"
- value ("MethodKindSet" 1903))
- (object Attribute
- tool "Oracle8"
- name "OverloadID"
- value "")
- (object Attribute
- tool "Oracle8"
- name "OrderNumber"
- value "")
- (object Attribute
- tool "Oracle8"
- name "IsReadNoDataState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsReadNoProcessState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsWriteNoDataState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsWriteNoProcessState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsSelfish"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "TriggerType"
- value ("TriggerTypeSet" 1801))
- (object Attribute
- tool "Oracle8"
- name "TriggerEvent"
- value ("TriggerEventSet" 1601))
- (object Attribute
- tool "Oracle8"
- name "TriggerText"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TriggerReferencingNames"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TriggerForEach"
- value ("TriggerForEachSet" 1701))
- (object Attribute
- tool "Oracle8"
- name "TriggerWhenClause"
- value "")
- (object Attribute
- tool "Oracle8"
- name "MethodKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "MapMethod"
- value 1901)
- (object Attribute
- tool "Oracle8"
- name "OrderMethod"
- value 1902)
- (object Attribute
- tool "Oracle8"
- name "Function"
- value 1903)
- (object Attribute
- tool "Oracle8"
- name "Procedure"
- value 1904)
- (object Attribute
- tool "Oracle8"
- name "Operator"
- value 1905)
- (object Attribute
- tool "Oracle8"
- name "Constructor"
- value 1906)
- (object Attribute
- tool "Oracle8"
- name "Destructor"
- value 1907)
- (object Attribute
- tool "Oracle8"
- name "Trigger"
- value 1908)
- (object Attribute
- tool "Oracle8"
- name "Calculated"
- value 1909)))
- (object Attribute
- tool "Oracle8"
- name "TriggerTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "AFTER"
- value 1801)
- (object Attribute
- tool "Oracle8"
- name "BEFORE"
- value 1802)
- (object Attribute
- tool "Oracle8"
- name "INSTEAD OF"
- value 1803)))
- (object Attribute
- tool "Oracle8"
- name "TriggerForEachSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "ROW"
- value 1701)
- (object Attribute
- tool "Oracle8"
- name "STATEMENT"
- value 1702)))
- (object Attribute
- tool "Oracle8"
- name "TriggerEventSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "INSERT"
- value 1601)
- (object Attribute
- tool "Oracle8"
- name "UPDATE"
- value 1602)
- (object Attribute
- tool "Oracle8"
- name "DELETE"
- value 1603)
- (object Attribute
- tool "Oracle8"
- name "INSERT OR UPDATE"
- value 1604)
- (object Attribute
- tool "Oracle8"
- name "INSERT OR DELETE"
- value 1605)
- (object Attribute
- tool "Oracle8"
- name "UPDATE OR DELETE"
- value 1606)
- (object Attribute
- tool "Oracle8"
- name "INSERT OR UPDATE OR DELETE"
- value 1607)))))
- (object Attribute
- tool "Oracle8"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "OrderNumber"
- value "")))
- (object Attribute
- tool "Oracle8"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "OrderNumber"
- value "")
- (object Attribute
- tool "Oracle8"
- name "IsUnique"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "NullsAllowed"
- value TRUE)
- (object Attribute
- tool "Oracle8"
- name "Length"
- value "")
- (object Attribute
- tool "Oracle8"
- name "Precision"
- value "2")
- (object Attribute
- tool "Oracle8"
- name "Scale"
- value "6")
- (object Attribute
- tool "Oracle8"
- name "IsIndex"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsPrimaryKey"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "CompositeUnique"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "CheckConstraint"
- value "")))
- (object Attribute
- tool "Oracle8"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "R2Editor"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "ComponentTest"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "cg"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "cg"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerAnnotations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerVersion"
- value FALSE)
- (object Attribute
- tool "cg"
- name "UseMSVC"
- value FALSE)
- (object Attribute
- tool "cg"
- name "HeaderFileExtension"
- value "h")
- (object Attribute
- tool "cg"
- name "HeaderFileBackupExtension"
- value "h~")
- (object Attribute
- tool "cg"
- name "HeaderFileTemporaryExtension"
- value "h#")
- (object Attribute
- tool "cg"
- name "CodeFileExtension"
- value "cpp")
- (object Attribute
- tool "cg"
- name "CodeFileBackupExtension"
- value "cp~")
- (object Attribute
- tool "cg"
- name "CodeFileTemporaryExtension"
- value "cp#")
- (object Attribute
- tool "cg"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "cg"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "cg"
- name "Directory"
- value "$ROSECPP_SOURCE")
- (object Attribute
- tool "cg"
- name "PathSeparator"
- value "")
- (object Attribute
- tool "cg"
- name "FileNameFormat"
- value "128vx_b")
- (object Attribute
- tool "cg"
- name "BooleanType"
- value "int")
- (object Attribute
- tool "cg"
- name "AllowTemplates"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AllowExplicitInstantiations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowProtectedInheritance"
- value TRUE)
- (object Attribute
- tool "cg"
- name "CommentWidth"
- value 60)
- (object Attribute
- tool "cg"
- name "OneByValueContainer"
- value "$targetClass")
- (object Attribute
- tool "cg"
- name "OneByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "OptionalByValueContainer"
- value "OptionalByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "OptionalByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "FixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "FixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "BoundedByValueContainer"
- value "BoundedListByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByValueContainer"
- value "BoundedSetByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "BoundedByReferenceContainer"
- value "BoundedListByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByReferenceContainer"
- value "BoundedSetByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnboundedByValueContainer"
- value "UnboundedListByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByValueContainer"
- value "UnboundedSetByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnboundedByReferenceContainer"
- value "UnboundedListByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByReferenceContainer"
- value "UnboundedSetByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "QualifiedByValueContainer"
- value "AssociationByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByValueContainer"
- value "DictionaryByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "QualifiedByReferenceContainer"
- value "AssociationByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByReferenceContainer"
- value "DictionaryByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "AlwaysKeepOrphanedCode"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "compiler2.1__Project"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerAnnotations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerVersion"
- value FALSE)
- (object Attribute
- tool "cg"
- name "HeaderFileExtension"
- value "h")
- (object Attribute
- tool "cg"
- name "HeaderFileBackupExtension"
- value "h~")
- (object Attribute
- tool "cg"
- name "HeaderFileTemporaryExtension"
- value "h#")
- (object Attribute
- tool "cg"
- name "CodeFileExtension"
- value "cpp")
- (object Attribute
- tool "cg"
- name "CodeFileBackupExtension"
- value "cp~")
- (object Attribute
- tool "cg"
- name "CodeFileTemporaryExtension"
- value "cp#")
- (object Attribute
- tool "cg"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "cg"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "cg"
- name "Directory"
- value "$ROSECPP_SOURCE")
- (object Attribute
- tool "cg"
- name "BooleanType"
- value "int")
- (object Attribute
- tool "cg"
- name "AllowTemplates"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AllowExplicitInstantiations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowProtectedInheritance"
- value TRUE)
- (object Attribute
- tool "cg"
- name "OneByValueContainer"
- value "$targetClass")
- (object Attribute
- tool "cg"
- name "OneByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "OptionalByValueContainer"
- value "OptionalByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "OptionalByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "FixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "FixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "BoundedByValueContainer"
- value "BoundedListByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByValueContainer"
- value "BoundedSetByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "BoundedByReferenceContainer"
- value "BoundedListByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByReferenceContainer"
- value "BoundedSetByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnboundedByValueContainer"
- value "UnboundedListByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByValueContainer"
- value "UnboundedSetByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnboundedByReferenceContainer"
- value "UnboundedListByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByReferenceContainer"
- value "UnboundedSetByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "QualifiedByValueContainer"
- value "AssociationByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByValueContainer"
- value "DictionaryByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "QualifiedByReferenceContainer"
- value "AssociationByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByReferenceContainer"
- value "DictionaryByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "PathSeparator"
- value "")
- (object Attribute
- tool "cg"
- name "FileNameFormat"
- value "128vx_b")
- (object Attribute
- tool "cg"
- name "AlwaysKeepOrphanedCode"
- value FALSE)
- (object Attribute
- tool "cg"
- name "UseMSVC"
- value FALSE)
- (object Attribute
- tool "cg"
- name "CommentWidth"
- value 60)))
- (object Attribute
- tool "cg"
- name "compiler3.0__Project"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerAnnotations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerVersion"
- value FALSE)
- (object Attribute
- tool "cg"
- name "HeaderFileExtension"
- value "h")
- (object Attribute
- tool "cg"
- name "HeaderFileBackupExtension"
- value "h~")
- (object Attribute
- tool "cg"
- name "HeaderFileTemporaryExtension"
- value "h#")
- (object Attribute
- tool "cg"
- name "CodeFileExtension"
- value "cpp")
- (object Attribute
- tool "cg"
- name "CodeFileBackupExtension"
- value "cp~")
- (object Attribute
- tool "cg"
- name "CodeFileTemporaryExtension"
- value "cp#")
- (object Attribute
- tool "cg"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "cg"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "cg"
- name "Directory"
- value "$ROSECPP_SOURCE")
- (object Attribute
- tool "cg"
- name "BooleanType"
- value "int")
- (object Attribute
- tool "cg"
- name "AllowTemplates"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AllowExplicitInstantiations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowProtectedInheritance"
- value TRUE)
- (object Attribute
- tool "cg"
- name "OneByValueContainer"
- value "$targetClass")
- (object Attribute
- tool "cg"
- name "OneByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "OptionalByValueContainer"
- value "OptionalByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "OptionalByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "FixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "FixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "BoundedByValueContainer"
- value "BoundedListByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByValueContainer"
- value "BoundedSetByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "BoundedByReferenceContainer"
- value "BoundedListByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByReferenceContainer"
- value "BoundedSetByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnboundedByValueContainer"
- value "UnboundedListByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByValueContainer"
- value "UnboundedSetByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnboundedByReferenceContainer"
- value "UnboundedListByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByReferenceContainer"
- value "UnboundedSetByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "QualifiedByValueContainer"
- value "AssociationByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByValueContainer"
- value "DictionaryByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "QualifiedByReferenceContainer"
- value "AssociationByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByReferenceContainer"
- value "DictionaryByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "PathSeparator"
- value "")
- (object Attribute
- tool "cg"
- name "FileNameFormat"
- value "128vx_b")
- (object Attribute
- tool "cg"
- name "AlwaysKeepOrphanedCode"
- value FALSE)
- (object Attribute
- tool "cg"
- name "UseMSVC"
- value FALSE)
- (object Attribute
- tool "cg"
- name "CommentWidth"
- value 60)))
- (object Attribute
- tool "cg"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "ImplementationType"
- value "")
- (object Attribute
- tool "cg"
- name "ClassKey"
- value "class")
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "PutBodiesInSpec"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateDefaultConstructor"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "DefaultConstructorVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineDefaultConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ExplicitDefaultConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateCopyConstructor"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "CopyConstructorVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineCopyConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ExplicitCopyConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateDestructor"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DestructorVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "DestructorKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineDestructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateAssignmentOperation"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "AssignmentVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "AssignmentKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineAssignmentOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateEqualityOperations"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "EqualityVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "EqualityKind"
- value ("FriendKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineEqualityOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateRelationalOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "RelationalVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "RelationalKind"
- value ("FriendKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineRelationalOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateStorageMgmtOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "StorageMgmtVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineStorageMgmtOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateSubscriptOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "SubscriptVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "SubscriptKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "SubscriptResultType"
- value "")
- (object Attribute
- tool "cg"
- name "InlineSubscriptOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateDereferenceOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DereferenceVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "DereferenceKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "DereferenceResultType"
- value "")
- (object Attribute
- tool "cg"
- name "InlineDereferenceOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateIndirectionOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IndirectionVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "IndirectionKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "IndirectionResultType"
- value "")
- (object Attribute
- tool "cg"
- name "InlineIndirectionOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateStreamOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "StreamVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineStreamOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ThreeKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)))
- (object Attribute
- tool "cg"
- name "KindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)))
- (object Attribute
- tool "cg"
- name "FriendKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GenerateSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "DeclareAndDefine"
- value 199)
- (object Attribute
- tool "cg"
- name "DeclareOnly"
- value 205)
- (object Attribute
- tool "cg"
- name "DoNotDeclare"
- value 206)))
- (object Attribute
- tool "cg"
- name "VisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)))))
- (object Attribute
- tool "cg"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "CmIdentification"
- value (value Text " %X% %Q% %Z% %W%"))
- (object Attribute
- tool "cg"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "FileName"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "AllowExtensionlessFileName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InclusionProtectionSymbol"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "IncludeFormat"
- value (value Text
-|// $package
-|#include "$file"
-|
- ))
- (object Attribute
- tool "cg"
- name "IncludeBySimpleName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludePrecompiledHeader"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludeOrder"
- value "AMIR")
- (object Attribute
- tool "cg"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "InliningStyle"
- value ("InliningStyleSet" 207))
- (object Attribute
- tool "cg"
- name "InliningStyleSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "InClassDeclaration"
- value 208)
- (object Attribute
- tool "cg"
- name "FollowingClassDeclaration"
- value 207)))
- (object Attribute
- tool "cg"
- name "TypesDefined"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "IncludeClosure"
- value (value Text ""))))
- (object Attribute
- tool "cg"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "CmIdentification"
- value (value Text " %X% %Q% %Z% %W%"))
- (object Attribute
- tool "cg"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "FileName"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "AllowExtensionlessFileName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludeFormat"
- value (value Text
-|// $package
-|#include "$file"
-|
- ))
- (object Attribute
- tool "cg"
- name "IncludeBySimpleName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludePrecompiledHeader"
- value TRUE)
- (object Attribute
- tool "cg"
- name "IncludeOrder"
- value "AMIR")
- (object Attribute
- tool "cg"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "InliningStyle"
- value ("InliningStyleSet" 207))
- (object Attribute
- tool "cg"
- name "InliningStyleSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "InClassDeclaration"
- value 208)
- (object Attribute
- tool "cg"
- name "FollowingClassDeclaration"
- value 207)))
- (object Attribute
- tool "cg"
- name "TypesDefined"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "IncludeClosure"
- value (value Text ""))))
- (object Attribute
- tool "cg"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "OperationKind"
- value ("OperationKindSet" 200))
- (object Attribute
- tool "cg"
- name "OperationKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GenerateAbstractBody"
- value FALSE)
- (object Attribute
- tool "cg"
- name "SpecialDeclReturnType"
- value "")
- (object Attribute
- tool "cg"
- name "OperationIsConst"
- value FALSE)
- (object Attribute
- tool "cg"
- name "OperationIsExplicit"
- value FALSE)
- (object Attribute
- tool "cg"
- name "Inline"
- value FALSE)
- (object Attribute
- tool "cg"
- name "EntryCode"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "ExitCode"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "CCRegion"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "BodyAnnotations"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateFriendBody"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateFriendDecl"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "Ordered"
- value TRUE)
- (object Attribute
- tool "cg"
- name "NameIfUnlabeled"
- value "the_$supplier")
- (object Attribute
- tool "cg"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "cg"
- name "DataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtRelationshipVisibility"
- value 210)))
- (object Attribute
- tool "cg"
- name "DataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "DataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DataMemberFieldSize"
- value "")
- (object Attribute
- tool "cg"
- name "InitialValue"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "GenerateGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetName"
- value "get_$relationship")
- (object Attribute
- tool "cg"
- name "SetName"
- value "set_$relationship")
- (object Attribute
- tool "cg"
- name "GetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GetSetKindsSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "ContainerClass"
- value "")
- (object Attribute
- tool "cg"
- name "SelectorName"
- value "")
- (object Attribute
- tool "cg"
- name "SelectorType"
- value "")
- (object Attribute
- tool "cg"
- name "GetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "GetResultIsConstSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_Function"
- value 2)))
- (object Attribute
- tool "cg"
- name "GetSetByReference"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "SetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "ForwardReferenceOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "HasRelTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Array"
- value 24)
- (object Attribute
- tool "cg"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "cg"
- name "default__Association"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "NameIfUnlabeled"
- value "the_$targetClass")))
- (object Attribute
- tool "cg"
- name "default__Inherit"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "InstanceArguments"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "ForwardReferenceOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "NameIfUnlabeled"
- value "the_$targetClass")
- (object Attribute
- tool "cg"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DataMemberName"
- value "$target")
- (object Attribute
- tool "cg"
- name "DataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtRelationshipVisibility"
- value 210)))
- (object Attribute
- tool "cg"
- name "DataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "DataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DataMemberFieldSize"
- value "")
- (object Attribute
- tool "cg"
- name "InitialValue"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "ContainerClass"
- value "")
- (object Attribute
- tool "cg"
- name "ContainerGet"
- value "$data.get($keys)")
- (object Attribute
- tool "cg"
- name "ContainerSet"
- value "$data.set($keys,$value)")
- (object Attribute
- tool "cg"
- name "QualifiedContainer"
- value "")
- (object Attribute
- tool "cg"
- name "AssocClassContainer"
- value "$supplier *")
- (object Attribute
- tool "cg"
- name "AssocClassInitialValue"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "GetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GetSetKindsSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GetSetByReference"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetName"
- value "get_$target")
- (object Attribute
- tool "cg"
- name "GetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "GetResultIsConstSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_Function"
- value 2)))
- (object Attribute
- tool "cg"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "SetName"
- value "set_$target")
- (object Attribute
- tool "cg"
- name "SetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedGetSetByReference"
- value ("QualifiedGetSetByReferenceSet" 2))
- (object Attribute
- tool "cg"
- name "QualifiedGetSetByReferenceSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_GetSetByReference"
- value 2)))
- (object Attribute
- tool "cg"
- name "GenerateQualifiedGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedGetName"
- value "get_$target")
- (object Attribute
- tool "cg"
- name "QualifiedGetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedGetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "InlineQualifiedGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateQualifiedSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedSetName"
- value "set_$target")
- (object Attribute
- tool "cg"
- name "QualifiedSetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineQualifiedSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateAssocClassDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberName"
- value "$target")
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtRelationshipVisibility"
- value 210)))
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AssocClassGetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GenerateAssocClassGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassGetName"
- value "get_$target")
- (object Attribute
- tool "cg"
- name "AssocClassGetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassGetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "InlineAssocClassGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateAssocClassSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassSetName"
- value "set_$target")
- (object Attribute
- tool "cg"
- name "AssocClassSetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineAssocClassSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassForwardReferenceOnly"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Array"
- value 24)
- (object Attribute
- tool "cg"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "cg"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DataMemberName"
- value "$attribute")
- (object Attribute
- tool "cg"
- name "DataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtAttributeVisibility"
- value 211)))
- (object Attribute
- tool "cg"
- name "DataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "DataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DataMemberFieldSize"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetName"
- value "get_$attribute")
- (object Attribute
- tool "cg"
- name "SetName"
- value "set_$attribute")
- (object Attribute
- tool "cg"
- name "GetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GetSetKindsSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "GetResultIsConstSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_Function"
- value 2)))
- (object Attribute
- tool "cg"
- name "GetSetByReference"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "SetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "CCRegion"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Uses"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "ForwardReferenceOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "BodyReferenceOnly"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "default__Subsystem"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Directory"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "DirectoryIsOnSearchList"
- value FALSE)
- (object Attribute
- tool "cg"
- name "PrecompiledHeader"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "IsNamespace"
- value FALSE)
- (object Attribute
- tool "cg"
- name "Indent"
- value 2)
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))))
- (object Attribute
- tool "MSVC"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "MSVC"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Version"
- value "5.0")))
- (object Attribute
- tool "MSVC"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCClassTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCClassTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Interface_Part"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Connection_Part"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Class_Factory"
- value 3)))
- (object Attribute
- tool "MSVC"
- name "CObjectFunctionality"
- value ("CObjectFunctionalitySet" 0))
- (object Attribute
- tool "MSVC"
- name "CObjectFunctionalitySet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "None"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Dynamic"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Dyncreate"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Serial"
- value 3)))
- (object Attribute
- tool "MSVC"
- name "GenerateOverrideGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "GenerateDataGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_DATA_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateFieldGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_FIELD_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateMessageGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "GenerateMessageMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_MSG_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MESSAGE_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "OLEFactory"
- value ("OLEFactorySet" 0))
- (object Attribute
- tool "MSVC"
- name "OLEFactorySet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "None"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Built_in"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Simple"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Licensed"
- value 3)))
- (object Attribute
- tool "MSVC"
- name "OLEName"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLEClassID"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateOLECtlType"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "OLECtlType"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateOLETypeLib"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "OLETypeLibID"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLETypeLibMajor"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLETypeLibMinor"
- value "")
- (object Attribute
- tool "MSVC"
- name "GeneratePropPageIDs"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "OLEPropPageIDs"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateDispatchMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "StockProperties"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "StockFunctions"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DispatchDefValue"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateDispIdEnum"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_DISP_ID_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateInterfaceMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "INTERFACE_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "InitInterface"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateEventMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_EVENT_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "StockEvents"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateEventSinkMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_EVENTSINK_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "PropNotifySinks"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateConnectionMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "CONNECTION_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "ConnectionPointIID"
- value "")
- (object Attribute
- tool "MSVC"
- name "InheritanceType"
- value "")
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLECommands"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MFCDeclares"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MFCImplements"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "ATL_Declares"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateCOMMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "COM_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateConnectionPointMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "CONNECTION_POINT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateMsgMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "MSG_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GeneratePropertyMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "PROPERTY_MAP_Entries"
- value (value Text ""))))
- (object Attribute
- tool "MSVC"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCOperationTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCOperationTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Virtual_Override"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Message_Handler"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dispatch_Handler"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Event_Firing_Function"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Event_Sink_Handler"
- value 5)
- (object Attribute
- tool "MSVC"
- name "Std_OLE_Method"
- value 6)
- (object Attribute
- tool "MSVC"
- name "Command_Parser"
- value 7)
- (object Attribute
- tool "MSVC"
- name "Property_Get_Function"
- value 8)
- (object Attribute
- tool "MSVC"
- name "Property_Set_Function"
- value 9)
- (object Attribute
- tool "MSVC"
- name "Property_Notify_Function"
- value 10)
- (object Attribute
- tool "MSVC"
- name "Macro_Generated_Function"
- value 11)))
- (object Attribute
- tool "MSVC"
- name "AFX_MSG_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MESSAGE_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "BodyImage"
- value (value Text ""))))
- (object Attribute
- tool "MSVC"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCAttributeTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCAttributeTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Member_Property"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Get_Set_Property"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dialog_Data"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Field_Data"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Stock_Property"
- value 5)))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "PointerBase"
- value "")
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "StockPropertyImplementation"
- value "")))
- (object Attribute
- tool "MSVC"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCAttributeTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCAttributeTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Member_Property"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Get_Set_Property"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dialog_Data"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Field_Data"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Stock_Property"
- value 5)))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "PointerBase"
- value "")
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "StockPropertyImplementation"
- value "")))
- (object Attribute
- tool "MSVC"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCAttributeTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCAttributeTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Member_Property"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Get_Set_Property"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dialog_Data"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Field_Data"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Stock_Property"
- value 5)))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "PointerBase"
- value "")
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "StockPropertyImplementation"
- value "")))
- (object Attribute
- tool "MSVC"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "GenerateIncludesGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_INCLUDES_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateInsertLocation"
- value FALSE)))
- (object Attribute
- tool "MSVC"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "GenerateIncludesGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_INCLUDES_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateInsertLocation"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Rose Model Integrator"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Rose Web Publisher"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "COM"
- name "propertyId"
- value "783606378")
- (object Attribute
- tool "COM"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "TypeKinds"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "enum"
- value 100)
- (object Attribute
- tool "COM"
- name "record"
- value 101)
- (object Attribute
- tool "COM"
- name "module"
- value 102)
- (object Attribute
- tool "COM"
- name "interface"
- value 103)
- (object Attribute
- tool "COM"
- name "dispinterface"
- value 104)
- (object Attribute
- tool "COM"
- name "coclass"
- value 105)
- (object Attribute
- tool "COM"
- name "alias"
- value 106)
- (object Attribute
- tool "COM"
- name "union"
- value 107)
- (object Attribute
- tool "COM"
- name "max"
- value 108)
- (object Attribute
- tool "COM"
- name "(none)"
- value 109)))
- (object Attribute
- tool "COM"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "COM"
- name "kind"
- value ("TypeKinds" 109))
- (object Attribute
- tool "COM"
- name "uuid"
- value "")
- (object Attribute
- tool "COM"
- name "version"
- value "")
- (object Attribute
- tool "COM"
- name "helpstring"
- value "")
- (object Attribute
- tool "COM"
- name "helpcontext"
- value "")
- (object Attribute
- tool "COM"
- name "attributes"
- value "")
- (object Attribute
- tool "COM"
- name "dllname"
- value "")
- (object Attribute
- tool "COM"
- name "alias"
- value "")))
- (object Attribute
- tool "COM"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "COM"
- name "id"
- value "")
- (object Attribute
- tool "COM"
- name "helpstring"
- value "")
- (object Attribute
- tool "COM"
- name "attributes"
- value "")))
- (object Attribute
- tool "COM"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "COM"
- name "id"
- value "")
- (object Attribute
- tool "COM"
- name "helpstring"
- value "")
- (object Attribute
- tool "COM"
- name "attributes"
- value "")))
- (object Attribute
- tool "COM"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "COM"
- name "filename"
- value "")
- (object Attribute
- tool "COM"
- name "library"
- value "")
- (object Attribute
- tool "COM"
- name "uuid"
- value "")
- (object Attribute
- tool "COM"
- name "version"
- value "")
- (object Attribute
- tool "COM"
- name "helpstring"
- value "")
- (object Attribute
- tool "COM"
- name "helpfile"
- value "")
- (object Attribute
- tool "COM"
- name "helpcontext"
- value "")
- (object Attribute
- tool "COM"
- name "lcid"
- value "")
- (object Attribute
- tool "COM"
- name "attributes"
- value "")))
- (object Attribute
- tool "COM"
- name "default__Param"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "attributes"
- value "")))
- (object Attribute
- tool "COM"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Version Control"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "propertyId"
- value "783606378")
- (object Attribute
- tool "Visual Basic"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "UpdateCode"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "UpdateModel"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "InstancingSet"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "Private"
- value 221)
- (object Attribute
- tool "Visual Basic"
- name "PublicNotCreatable"
- value 213)
- (object Attribute
- tool "Visual Basic"
- name "SingleUse"
- value 214)
- (object Attribute
- tool "Visual Basic"
- name "GlobalSingleUse"
- value 215)
- (object Attribute
- tool "Visual Basic"
- name "MultiUse"
- value 219)
- (object Attribute
- tool "Visual Basic"
- name "GlobalMultiUse"
- value 220)))
- (object Attribute
- tool "Visual Basic"
- name "BaseSet"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "(none)"
- value 222)
- (object Attribute
- tool "Visual Basic"
- name "0"
- value 223)
- (object Attribute
- tool "Visual Basic"
- name "1"
- value 224)))
- (object Attribute
- tool "Visual Basic"
- name "OptionBase"
- value ("BaseSet" 222))
- (object Attribute
- tool "Visual Basic"
- name "OptionExplicit"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "OptionCompare"
- value ("CompareSet" 202))
- (object Attribute
- tool "Visual Basic"
- name "Instancing"
- value ("InstancingSet" 219))
- (object Attribute
- tool "Visual Basic"
- name "CompareSet"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "(none)"
- value 202)
- (object Attribute
- tool "Visual Basic"
- name "Binary"
- value 203)
- (object Attribute
- tool "Visual Basic"
- name "Text"
- value 204)))))
- (object Attribute
- tool "Visual Basic"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "LibraryName"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "AliasName"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "IsStatic"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ProcedureID"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "ReplaceExistingBody"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "DefaultBody"
- value (value Text ""))))
- (object Attribute
- tool "Visual Basic"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "New"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "WithEvents"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ProcedureID"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "PropertyName"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "Subscript"
- value "")))
- (object Attribute
- tool "Visual Basic"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "UpdateCode"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "New"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "WithEvents"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "FullName"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ProcedureID"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "PropertyName"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "Subscript"
- value "")))
- (object Attribute
- tool "Visual Basic"
- name "default__Inherit"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "ImplementsDelegation"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "FullName"
- value FALSE)))
- (object Attribute
- tool "Visual Basic"
- name "default__Param"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "ByVal"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ByRef"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "Optional"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ParamArray"
- value FALSE)))
- (object Attribute
- tool "Visual Basic"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "ProjectFile"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "UpdateCode"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "UpdateModel"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "ImportReferences"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "QuickImport"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "ImportBinary"
- value FALSE)))
- (object Attribute
- tool "Visual Basic"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "VisualStudio"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Web Modeler"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "XML_DTD"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "XML_DTD"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "XML_DTD"
- name "Editor"
- value ("EditorType" 100))
- (object Attribute
- tool "XML_DTD"
- name "StopOnError"
- value TRUE)
- (object Attribute
- tool "XML_DTD"
- name "EditorType"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "BuiltIn"
- value 100)
- (object Attribute
- tool "XML_DTD"
- name "WindowsShell"
- value 101)))))
- (object Attribute
- tool "XML_DTD"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "Entity_SystemID"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "Entity_PublicID"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "NotationValue"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "InternalValue"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "ParameterEntity"
- value FALSE)
- (object Attribute
- tool "XML_DTD"
- name "ExternalEntity"
- value FALSE)
- (object Attribute
- tool "XML_DTD"
- name "Notation_SystemID"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "Notation_PublicID"
- value "")))
- (object Attribute
- tool "XML_DTD"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "DefaultDeclType"
- value "")))
- (object Attribute
- tool "XML_DTD"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "Assign All"
- value FALSE)
- (object Attribute
- tool "XML_DTD"
- name "ComponentPath"
- value "")))
- (object Attribute
- tool "XML_DTD"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "ClearCase"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "RequisitePro"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "SoDA"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "TopLink"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Cplusplus"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "RevEngRootDirectory"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "RootPackage"
- value "C++ Reverse Engineered")
- (object Attribute
- tool "Cplusplus"
- name "RevEngDirectoriesAsPackages"
- value FALSE)
- (object Attribute
- tool "Cplusplus"
- name "HeaderFileExtension"
- value ".h")
- (object Attribute
- tool "Cplusplus"
- name "ImplementationFileExtension"
- value ".cpp")
- (object Attribute
- tool "Cplusplus"
- name "NewHeaderFileDirectory"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "NewImplementationFileDirectory"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "FileCapitalization"
- value ("FileCapitalizationSet" 0))
- (object Attribute
- tool "Cplusplus"
- name "CodeGenExtraDirectories"
- value ("CodeGenExtraDirectoriesSet" 0))
- (object Attribute
- tool "Cplusplus"
- name "StripClassPrefix"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "UseTabs"
- value FALSE)
- (object Attribute
- tool "Cplusplus"
- name "TabWidth"
- value 8)
- (object Attribute
- tool "Cplusplus"
- name "IndentWidth"
- value 4)
- (object Attribute
- tool "Cplusplus"
- name "AccessIndentation"
- value -2)
- (object Attribute
- tool "Cplusplus"
- name "ModelIdCommentRules"
- value ("ModelIdCommentRulesSet" 1))
- (object Attribute
- tool "Cplusplus"
- name "PageWidth"
- value 80)
- (object Attribute
- tool "Cplusplus"
- name "ClassMemberOrder"
- value ("MemberOrderSet" 1))
- (object Attribute
- tool "Cplusplus"
- name "OneParameterPerLine"
- value FALSE)
- (object Attribute
- tool "Cplusplus"
- name "NamespaceBraceStyle"
- value ("BraceStyleSet" 2))
- (object Attribute
- tool "Cplusplus"
- name "ClassBraceStyle"
- value ("BraceStyleSet" 2))
- (object Attribute
- tool "Cplusplus"
- name "FunctionBraceStyle"
- value ("BraceStyleSet" 2))
- (object Attribute
- tool "Cplusplus"
- name "Copyright"
- value (value Text ""))
- (object Attribute
- tool "Cplusplus"
- name "InitialHeaderIncludes"
- value (value Text ""))
- (object Attribute
- tool "Cplusplus"
- name "InitialBodyIncludes"
- value (value Text ""))
- (object Attribute
- tool "Cplusplus"
- name "CodeGenExtraDirectoriesSet"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "None"
- value 0)
- (object Attribute
- tool "Cplusplus"
- name "Namespaces"
- value 1)
- (object Attribute
- tool "Cplusplus"
- name "Packages"
- value 2)))
- (object Attribute
- tool "Cplusplus"
- name "FileCapitalizationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Same as model"
- value 0)
- (object Attribute
- tool "Cplusplus"
- name "Lower case"
- value 1)
- (object Attribute
- tool "Cplusplus"
- name "Upper case"
- value 2)
- (object Attribute
- tool "Cplusplus"
- name "Lower case with underscores"
- value 3)))
- (object Attribute
- tool "Cplusplus"
- name "BraceStyleSet"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "B1"
- value 1)
- (object Attribute
- tool "Cplusplus"
- name "B2"
- value 2)
- (object Attribute
- tool "Cplusplus"
- name "B3"
- value 3)
- (object Attribute
- tool "Cplusplus"
- name "B4"
- value 4)
- (object Attribute
- tool "Cplusplus"
- name "B5"
- value 5)))
- (object Attribute
- tool "Cplusplus"
- name "MemberOrderSet"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Public First"
- value 1)
- (object Attribute
- tool "Cplusplus"
- name "Private First"
- value 2)
- (object Attribute
- tool "Cplusplus"
- name "Order by kind"
- value 3)
- (object Attribute
- tool "Cplusplus"
- name "Unordered"
- value 4)))
- (object Attribute
- tool "Cplusplus"
- name "ModelIdCommentRulesSet"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Code generation only"
- value 1)
- (object Attribute
- tool "Cplusplus"
- name "Code generation and reverse engineering"
- value 2)
- (object Attribute
- tool "Cplusplus"
- name "Never generate model IDs"
- value 3)))
- (object Attribute
- tool "Cplusplus"
- name "CreateBackupFiles"
- value FALSE)
- (object Attribute
- tool "Cplusplus"
- name "CommentRules"
- value ("CommentRulesSet" 1))
- (object Attribute
- tool "Cplusplus"
- name "CommentRulesSet"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Always synchronize"
- value 1)
- (object Attribute
- tool "Cplusplus"
- name "Code generation only"
- value 2)
- (object Attribute
- tool "Cplusplus"
- name "Reverse engineering only"
- value 3)
- (object Attribute
- tool "Cplusplus"
- name "Never synchronize"
- value 4)))))
- (object Attribute
- tool "Ada83"
- name "default__Param"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Mode"
- value ("ParameterModeSet" 232))
- (object Attribute
- tool "Ada83"
- name "ParameterModeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Default"
- value 232)
- (object Attribute
- tool "Ada83"
- name "In"
- value 204)
- (object Attribute
- tool "Ada83"
- name "Out"
- value 205)
- (object Attribute
- tool "Ada83"
- name "InOut"
- value 203)))))
- (object Attribute
- tool "Ada95"
- name "default__Param"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Mode"
- value ("ParameterModeSet" 232))
- (object Attribute
- tool "Ada95"
- name "ParameterModeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Default"
- value 232)
- (object Attribute
- tool "Ada95"
- name "In"
- value 204)
- (object Attribute
- tool "Ada95"
- name "Out"
- value 205)
- (object Attribute
- tool "Ada95"
- name "InOut"
- value 203)
- (object Attribute
- tool "Ada95"
- name "Access"
- value 220)))))
- (object Attribute
- tool "Deploy"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Cplusplus"
- name "default__Uses"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "BodyReferenceOnly"
- value FALSE)))
- (object Attribute
- tool "CORBA"
- name "default__Param"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "Direction"
- value ("ParamDirectionTypeSet" 102))
- (object Attribute
- tool "CORBA"
- name "ParamDirectionTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "in"
- value 102)
- (object Attribute
- tool "CORBA"
- name "inout"
- value 103)
- (object Attribute
- tool "CORBA"
- name "out"
- value 104))))))
- quid "3A0B2474027F"))
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/schema/adapterFactory.exsd b/plugins/org.eclipse.wst.common.emfworkbench.integration/schema/adapterFactory.exsd
deleted file mode 100644
index d0100dced..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/schema/adapterFactory.exsd
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.common.emfworkbench.integration">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.common.emfworkbench.integration" id="adapterFactory" name="Adapter Factory Extension"/>
- </appInfo>
- <documentation>
- This is used to register an adapter factory with the dynamic adapter factory.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="adapterFactory" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="adapterFactory">
- <annotation>
- <documentation>
- Defines the Adapter Factory being added. All added Adapter Factories are queriable whenever their Function Group and optional Viewer Id are specified.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="view" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="packageURI" type="string" use="required">
- <annotation>
- <documentation>
- The package URI that you are extending (for example &quot;ejb.xmi&quot;)
- </documentation>
- </annotation>
- </attribute>
- <attribute name="className" type="string" use="required">
- <annotation>
- <documentation>
- The fully qualified name of the class which implements org.eclipse.emf.common.notify.AdapterFactory.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The Unique identifier of the Adapter Factory extension. This will associate it with one or more function groups based on the function group patterns. Function Groups allow Content and Actions to be enabled or disabled based on project-specific information. Generally, they are used by vendors who wish to add functionality specific to their products, e.g. J2EE Application Servers.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="functionGroupID" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="view">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- An optional viewer Id which will limit the invocation of the defined Adapter Factory to the given viewer id.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- &lt;b&gt;This extension point is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.&lt;/b&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2005 IBM Corporation and others.&lt;br&gt;
-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 &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/schema/editModel.exsd b/plugins/org.eclipse.wst.common.emfworkbench.integration/schema/editModel.exsd
deleted file mode 100644
index 3a103a794..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/schema/editModel.exsd
+++ /dev/null
@@ -1,181 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.common.emfworkbench.integration">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.common.emfworkbench.integration" id="editModel" name="EMF Resource Edit Model"/>
- </appInfo>
- <documentation>
- Edit models provide a framework for managing a set of EMF resources within a unit of work. For example, a workspace operation may affect a change to multiple EMF resources. Edit models provide basic services such as loads, saves (when necessary), and validate edit for the managed resources. Edit models are reference counted, therefore a single instance of an edit model can be shared by more than one operation or editor. By declaring an edit model, a plugin provider enables other components to contribute resources to be managed by that edit model.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="editModel" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="editModel">
- <annotation>
- <documentation>
- The declaration for an edit model to be used in the workspace.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="editModelResource" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="editModelID" type="string" use="required">
- <annotation>
- <documentation>
- A unique identifier for the edit model.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="factoryClass" type="string" use="required">
- <annotation>
- <documentation>
- An optional factory class that is used for this edit model. The class must implement the interface &lt;code&gt;org.eclipse.wst.common.internal.emfworkbench.integration.EditModelFactory&lt;/code&gt;. If none is specified, then a generic &lt;code&gt;EditModel&lt;/code&gt; is created.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="loadUnknownResourcesAsReadOnly" type="boolean">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="parentModelID" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="editModelResource">
- <annotation>
- <documentation>
- This is an individual contribution of a resource to the edit model. If more than one instance of the same URI is registered against an edit model id, the resource is still only loaded once.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="URI" type="string" use="required">
- <annotation>
- <documentation>
- The URI of the resource relative to the root container from which EMF resources are loaded.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="autoload" type="boolean" use="default" value="false">
- <annotation>
- <documentation>
- Indicator which determines whether this resource should be autoloaded when the edit model is created, or when an IFile corresponding to this resource is added.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 1.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- &lt;pre&gt;
- &lt;extension
- id=&quot;editModel.acme.parent&quot;
- name=&quot;Acme Parent Edit Model&quot;
- point=&quot;org.eclipse.wst.common.emfworkbench.integration.editModel&quot;&gt;
- &lt;editModel
- editModelID=&quot;com.acme.acmepro.parent.editModel&quot;
- factoryClass=&quot;org.eclipse.wst.common.internal.emfworkbench.integration.EditModelFactory&quot;&gt;
- &lt;editModelResource URI=&quot;DIR/resource0.xml&quot;/&gt;
- &lt;editModelResource URI=&quot;DIR/resource1.xml&quot;/&gt;
- &lt;/editModel&gt;
- &lt;/extension&gt;
-
- &lt;extension
- id=&quot;editModel.acme.child&quot;
- name=&quot;Acme Child Edit Model&quot;
- point=&quot;org.eclipse.wst.common.emfworkbench.integration.editModel&quot;&gt;
- &lt;editModel
- editModelID=&quot;com.acme.acmepro.child.editModel&quot;
- factoryClass=&quot;org.eclipse.wst.common.internal.emfworkbench.integration.EditModelFactory&quot;
- parentModelID=&quot;com.acme.acmepro.parent.editModel&quot;&gt;
- &lt;editModelResource URI=&quot;DIR/resource2.xml&quot;/&gt;
- &lt;editModelResource URI=&quot;DIR/resource3.xml&quot;/&gt;
- &lt;/editModel&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Edit Models can be accessed through the &lt;code&gt;org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext&lt;/code&gt;.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2005 IBM Corporation and others.&lt;br&gt;
-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 &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/schema/editModelExtension.exsd b/plugins/org.eclipse.wst.common.emfworkbench.integration/schema/editModelExtension.exsd
deleted file mode 100644
index 006d2aeb1..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/schema/editModelExtension.exsd
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.common.emfworkbench.integration">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.common.emfworkbench.integration" id="editModelExtension" name="Edit Model Extensions"/>
- </appInfo>
- <documentation>
- The Edit Model Extension allows third parties to contribute expected resources to Edit Models. The functionGroupID allows users to select which extensions they choose to have enabled.
- </documentation>
- </annotation>
-
- <include schemaLocation="editModel.exsd"/>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="editModelExtension" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="editModelExtension">
- <annotation>
- <documentation>
- Edit model extensions allow components to contribute known resource URIs to an edit model. Whenever an edit model is loaded, the resources will automatically be loaded and managed by the edit model. Changes to the resources will be tracked and saved during operations or editor saves.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="editModelResource" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="editModelID" type="string" use="required">
- <annotation>
- <documentation>
- The unique id of the edit model being extended.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The unique identifier for this extension. This will be used to associate it with a function group pattern binding.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 1.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- &lt;pre&gt;
- &lt;extension
- point=&quot;org.eclipse.wst.common.emfworkbench.integration.editModelExtension&quot;&gt;
- &lt;editModelExtension
- editModelID=&quot;org.sample.inheritance.parent.editModel&quot;
- functionGroupID=&quot;org.sample.group&quot;&gt;
- &lt;editModelResource URI=&quot;DIR/extension0.xml&quot;/&gt;
- &lt;editModelResource URI=&quot;DIR/extension1.xml&quot;/&gt;
- &lt;/editModelExtension&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2005 IBM Corporation and others.&lt;br&gt;
-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 &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/schema/modifierHelperFactory.exsd b/plugins/org.eclipse.wst.common.emfworkbench.integration/schema/modifierHelperFactory.exsd
deleted file mode 100644
index 9cc07dbee..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/schema/modifierHelperFactory.exsd
+++ /dev/null
@@ -1,160 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.common.emfworkbench.integration">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.common.emfworkbench.integration" id="ModifierHelperFactory" name="Modifier Helper Factory"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <documentation>
- This is used to register for the model modifiers.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="factory" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="factory">
- <complexType>
- <sequence>
- <element ref="package" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="package">
- <complexType>
- <sequence>
- <element ref="type" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="uri" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="type">
- <complexType>
- <sequence>
- <element ref="feature" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="feature">
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="action" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- &lt;b&gt;This extension point is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.&lt;/b&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2005 IBM Corporation and others.&lt;br&gt;
-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 &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/CompatibilityWorkbenchURIConverterImpl.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/CompatibilityWorkbenchURIConverterImpl.java
deleted file mode 100644
index 8ae0cd127..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/CompatibilityWorkbenchURIConverterImpl.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 4, 2004
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.wst.common.internal.emfworkbench;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jem.util.emf.workbench.ResourceSetWorkbenchSynchronizer;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-import org.eclipse.jem.util.emf.workbench.WorkbenchURIConverterImpl;
-import org.eclipse.wst.common.internal.emf.resource.CompatibilityURIConverter;
-
-/**
- * @author schacher
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class CompatibilityWorkbenchURIConverterImpl extends WorkbenchURIConverterImpl implements CompatibilityURIConverter {
- /**
- *
- */
- public CompatibilityWorkbenchURIConverterImpl() {
- super();
- }
-
- /**
- * @param anInputContainer
- */
- public CompatibilityWorkbenchURIConverterImpl(IContainer anInputContainer) {
- super(anInputContainer);
- }
-
- /**
- * @param aContainer
- * @param aSynchronizer
- */
- public CompatibilityWorkbenchURIConverterImpl(IContainer aContainer, ResourceSetWorkbenchSynchronizer aSynchronizer) {
- super(aContainer, aSynchronizer);
- }
-
- /**
- * @param anInputContainer
- * @param anOutputContainer
- */
- public CompatibilityWorkbenchURIConverterImpl(IContainer anInputContainer, IContainer anOutputContainer) {
- super(anInputContainer, anOutputContainer);
- }
-
- /**
- * @param anInputContainer
- * @param anOutputContainer
- * @param aSynchronizer
- */
- public CompatibilityWorkbenchURIConverterImpl(IContainer anInputContainer, IContainer anOutputContainer, ResourceSetWorkbenchSynchronizer aSynchronizer) {
- super(anInputContainer, anOutputContainer, aSynchronizer);
- }
-
- /**
- * @see com.ibm.etools.xmi.helpers.CompatibilityURIConverter#deNormalize(URI)
- */
- public URI deNormalize(URI uri) {
- if (WorkbenchResourceHelperBase.isPlatformResourceURI(uri)) {
- IFile aFile = WorkbenchResourceHelper.getPlatformFile(uri);
- if (aFile != null) {
- IProject fileProject = aFile.getProject();
- //If it is not in the same project then just return the URI as is.
- if (resourceSetSynchronizer.getProject() == fileProject)
- return getContainerRelativeURI(aFile);
- }
- }
- return uri;
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFAdapterFactory.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFAdapterFactory.java
deleted file mode 100644
index 546c69587..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFAdapterFactory.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Feb 25, 2004
- *
- */
-package org.eclipse.wst.common.internal.emfworkbench;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-
-/**
- * @author mdelder
- *
- */
-public class EMFAdapterFactory implements IAdapterFactory {
-
- protected static final Class IPROJECT_CLASS = IProject.class;
- protected static final Class IRESOURCE_CLASS = IResource.class;
- protected static final Class IFILE_CLASS = IFile.class;
- protected static final Class EOBJECT_CLASS = EObject.class;
-
- /**
- *
- */
- public EMFAdapterFactory() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adaptableObject instanceof EObject) {
- if (adapterType == IFILE_CLASS || adapterType == IRESOURCE_CLASS)
- return WorkbenchResourceHelper.getFile((EObject) adaptableObject);
- else if (adapterType == IPROJECT_CLASS)
- return ProjectUtilities.getProject((EObject) adaptableObject);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
- return new Class[]{IPROJECT_CLASS, IRESOURCE_CLASS, IFILE_CLASS};
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFWorkbenchContext.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFWorkbenchContext.java
deleted file mode 100644
index 5c3174721..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFWorkbenchContext.java
+++ /dev/null
@@ -1,414 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 3, 2004
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.wst.common.internal.emfworkbench;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.jem.util.emf.workbench.EMFWorkbenchContextBase;
-import org.eclipse.jem.util.emf.workbench.ISynchronizerExtender;
-import org.eclipse.jem.util.emf.workbench.ProjectResourceSet;
-import org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.internal.emf.resource.CompatibilityXMIResource;
-import org.eclipse.wst.common.internal.emf.resource.ReferencedXMIFactoryImpl;
-import org.eclipse.wst.common.internal.emf.utilities.DefaultOverridableResourceFactoryRegistry;
-import org.eclipse.wst.common.internal.emfworkbench.edit.EditModelRegistry;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EditModel;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EditModelEvent;
-import org.eclipse.wst.common.internal.emfworkbench.integration.ProjectResourceSetEditImpl;
-
-/**
- * @author schacher
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class EMFWorkbenchContext extends EMFWorkbenchContextBase implements ISynchronizerExtender {
-
- private Map readOnlyModels = new HashMap();
- private Map editableModels = new HashMap();
-
- protected Adapter resourceSetListener;
-
- protected boolean defaultToMOF5Compatibility = false;
-
-
- /**
- * @param aProject
- */
- public EMFWorkbenchContext(IProject aProject) {
- super(aProject);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext#initializeResourceSet(org.eclipse.wst.common.internal.emfworkbench.ProjectResourceSet)
- */
- protected void initializeResourceSet(ProjectResourceSet aResourceSet) {
- super.initializeResourceSet(aResourceSet);
- Resource.Factory.Registry reg = new DefaultOverridableResourceFactoryRegistry();
- Resource.Factory factory = new ReferencedXMIFactoryImpl();
- reg.getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, factory);
- // add xmi because other plugins are registering it globally
- reg.getExtensionToFactoryMap().put("xmi", factory); //$NON-NLS-1$
- aResourceSet.setResourceFactoryRegistry(reg);
- aResourceSet.getSynchronizer().addExtender(this); // added so we can be informed of closes
- // to the project.
- startListeningToResourceSet();
- }
-
- public static String getCacheID(String editModelID, Map params) {
- return EditModelRegistry.getInstance().getCacheID(editModelID, params);
- }
-
- /**
- * This is the API that clients should use when they have an intent to modify a particular
- * resource. You should only access the resources through the J2EEEditModel that is returned by
- * this method if you have the intent to modify.
- *
- * @see J2EEEditModel
- */
- public final EditModel getEditModelForWrite(String editModelID, Object accessorKey, Map params) {
- EditModel editModel = getExistingEditModel(editModelID, params, false);
- if (null == editModel) {
- editModel = createEditModelForWrite(editModelID, params);
- synchronized (editModel) {
- cacheEditModel(editModel, params);
- editModel.access(accessorKey);
- }
- } else {
- synchronized (editModel) {
- if (editModel.isDisposed() || editModel.isDisposing()) {
- editModel = createEditModelForWrite(editModelID, params);
- cacheEditModel(editModel, params);
- }
- editModel.access(accessorKey);
- }
- }
- return editModel;
- }
-
- /**
- * This is the API that clients should use when they want to read a group of resources that are
- * normally managed by the edit model with
- *
- * @aKey. You should only access the resources through the J2EEEditModel that is returned by
- * this method. You must call releaseEditModel(...) when you are finished with the edit
- * model.
- * @see J2EEEditModel
- */
- public final EditModel getEditModelForRead(String editModelID, Object accessorKey, Map params) {
- EditModel editModel = getExistingEditModel(editModelID, params, true);
- if (null == editModel) {
- editModel = createEditModelForRead(editModelID, params);
- synchronized (editModel) {
- cacheEditModel(editModel, params);
- editModel.access(accessorKey);
- }
- } else {
- synchronized (editModel) {
- if (editModel.isDisposed() || editModel.isDisposing()) {
- editModel = createEditModelForRead(editModelID, params);
- cacheEditModel(editModel, params);
- }
- editModel.access(accessorKey);
- }
- }
- return editModel;
- }
-
- /**
- * This is the API that clients should use when they have an intent to modify a particular
- * resource. You should only access the resources through the J2EEEditModel that is returned by
- * this method if you have the intent to modify.
- *
- * @see J2EEEditModel
- */
- public final EditModel getEditModelForWrite(String editModelID, Object accessorKey) {
- return getEditModelForWrite(editModelID, accessorKey, null);
- }
-
- /**
- * This is the API that clients should use when they want to read a group of resources that are
- * normally managed by the edit model with
- *
- * @aKey. You should only access the resources through the J2EEEditModel that is returned by
- * this method. You must call releaseEditModel(...) when you are finished with the edit
- * model.
- * @see J2EEEditModel
- */
- public final EditModel getEditModelForRead(String editModelID, Object accessorKey) {
- return getEditModelForRead(editModelID, accessorKey, null);
- }
-
-
-
- public EditModel getExistingEditModel(String editModelID, Map params, boolean isReadOnly) {
- EditModel editModel = null;
- synchronized (readOnlyModels) {
- if (isReadOnly) {
- editModel = (EditModel) readOnlyModels.get(getCacheID(editModelID, params));
- } else {
- synchronized (editableModels) {
- editModel = (EditModel) editableModels.get(getCacheID(editModelID, params));
- }
- }
- }
- return editModel;
- }
-
- /**
- * Subclasses may override to return the appropriate read-only J2EEEditModel.
- */
- protected EditModel createEditModelForRead(String editModelID, Map params) {
- return EditModelRegistry.getInstance().createEditModelForRead(editModelID, this, params);
- }
-
- /**
- * Subclasses may override to return the appropriate J2EEEditModel.
- */
- protected EditModel createEditModelForWrite(String editModelID, Map params) {
- return EditModelRegistry.getInstance().createEditModelForWrite(editModelID, this, params);
- }
-
- /**
- * Insert the method's description here. Creation date: (4/16/2001 12:25:39 PM)
- *
- * @return java.util.List
- */
- public void cacheEditModel(EditModel editModel, Map params) {
- editModel.setParams(params);
- synchronized (readOnlyModels) {
- if (editModel.isReadOnly())
- readOnlyModels.put(getCacheID(editModel.getEditModelID(), params), editModel);
- else
- synchronized (editableModels) {
- editableModels.put(getCacheID(editModel.getEditModelID(), params), editModel);
- }
- }
- }
-
- protected void discardAllEditModels() {
- synchronized (readOnlyModels) {
- synchronized (editableModels) {
- discardModels(readOnlyModels.values());
- discardModels(editableModels.values());
- }
- }
-
- }
-
- private void discardModels(Collection editModels) {
- if (editModels != null && !editModels.isEmpty()) {
- // Make a copy for safety against concurrent modification
- Iterator it = new ArrayList(editModels).iterator();
- while (it.hasNext()) {
- ((EditModel) it.next()).dispose();
- }
- }
- }
-
- public void removeEditModel(EditModel editModel, boolean readOnly) {
- // The best way would be to recompute the cache id, but we don't care
- // because the edit model should only be cached once anyway
- synchronized (readOnlyModels) {
- if (readOnly)
- readOnlyModels.values().remove(editModel);
- else
- synchronized (editableModels) {
- editableModels.values().remove(editModel);
- }
- }
- }
-
- /**
- * Notify all editModels of the change.
- */
- protected void notifyEditModels(EditModelEvent anEvent) {
- if (anEvent == null)
- return;
- List aList = new ArrayList();
- synchronized (readOnlyModels) {
- synchronized (editableModels) {
- aList.addAll(readOnlyModels.values());
- aList.addAll(editableModels.values());
- }
- }
- EditModel editModel;
- for (int i = 0; i < aList.size(); i++) {
- editModel = (EditModel) aList.get(i);
- try {
- editModel.resourceChanged(anEvent);
- } catch (Exception e) {
- Logger.getLogger().logError(e);
- }
- }
- }
-
- protected boolean shouldNotifyEditModels() {
- synchronized (readOnlyModels) {
- synchronized (editableModels) {
- return !this.readOnlyModels.isEmpty() || !this.editableModels.isEmpty();
- }
- }
- }
-
- protected Adapter getResourceSetListener() {
- if (resourceSetListener == null)
- resourceSetListener = new ResourceSetListener();
- return resourceSetListener;
- }
-
-
- protected class ResourceSetListener extends AdapterImpl {
- /*
- * @see Adapter#notifyChanged(new ENotificationImpl((InternalEObject)Notifier,
- * int,(EStructuralFeature) EObject, Object, Object, int))
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- addedResource((Resource) notification.getNewValue());
- break;
- case Notification.REMOVE :
- removedResource((Resource) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- removedResources((List) notification.getOldValue());
- break;
- }
- }
- }
-
- /**
- * Notify all editModels of the change.
- */
- public void addedResource(Resource addedResource) {
- if (defaultToMOF5Compatibility && (addedResource != null) && (addedResource instanceof CompatibilityXMIResource))
- ((CompatibilityXMIResource) addedResource).setFormat(CompatibilityXMIResource.FORMAT_MOF5);
- if (shouldNotifyEditModels()) {
- EditModelEvent event = new EditModelEvent(EditModelEvent.ADDED_RESOURCE, null);
- event.addResource(addedResource);
- notifyEditModels(event);
- }
- }
-
- /**
- * Notify all editModels of the change.
- */
- public void removedResource(Resource removedResource) {
- if (shouldNotifyEditModels()) {
- EditModelEvent event = new EditModelEvent(EditModelEvent.REMOVED_RESOURCE, null);
- event.addResource(removedResource);
- notifyEditModels(event);
- }
- }
-
- /**
- * Notify all editModels of the change.
- */
- public void removedResources(List removedResources) {
- if (shouldNotifyEditModels()) {
- EditModelEvent event = new EditModelEvent(EditModelEvent.REMOVED_RESOURCE, null);
- event.addResources(removedResources);
- notifyEditModels(event);
- }
- }
-
- protected void startListeningToResourceSet() {
- ResourceSet set = getResourceSet();
- if (set != null)
- set.eAdapters().add(getResourceSetListener());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.internal.emfworkbench.ISynchronizerExtender#projectChanged(org.eclipse.core.resources.IResourceDelta)
- */
- public void projectChanged(IResourceDelta delta) {
- // default nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.internal.emfworkbench.ISynchronizerExtender#projectClosed()
- */
- public void projectClosed() {
- discardAllEditModels();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContextBase#createURIConverter(org.eclipse.wst.common.internal.emfworkbench.ProjectResourceSet)
- */
- protected WorkbenchURIConverter createURIConverter(ProjectResourceSet aResourceSet) {
- return new CompatibilityWorkbenchURIConverterImpl(getProject(), aResourceSet.getSynchronizer());
- }
-
- protected ProjectResourceSet createResourceSet() {
- if (project == null)
- throw new IllegalStateException("Attempt to create resource set with null project"); //$NON-NLS-1$
- return new ProjectResourceSetEditImpl(project);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContextBase#deleteFile(org.eclipse.emf.ecore.resource.Resource)
- */
- public void deleteFile(Resource resource) {
- try {
- WorkbenchResourceHelper.deleteResource(resource);
- } catch (CoreException ex) {
- Logger.getLogger().logError(ex);
- }
-
- }
-
- /**
- * @return Returns the defaultToMOF5Compatibility.
- */
- public boolean isDefaultToMOF5Compatibility() {
- return defaultToMOF5Compatibility;
- }
-
- /**
- * @param defaultToMOF5Compatibility
- * The defaultToMOF5Compatibility to set.
- */
- public void setDefaultToMOF5Compatibility(boolean defaultToMOF5Compatibility) {
- this.defaultToMOF5Compatibility = defaultToMOF5Compatibility;
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFWorkbenchEditResourceHandler.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFWorkbenchEditResourceHandler.java
deleted file mode 100644
index 8bd107368..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFWorkbenchEditResourceHandler.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on May 25, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.wst.common.internal.emfworkbench;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author vijayb
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class EMFWorkbenchEditResourceHandler extends NLS {
- private static final String BUNDLE_NAME = "emfworkbenchedit";//$NON-NLS-1$
-
- private EMFWorkbenchEditResourceHandler() {
- // Do not instantiate
- }
-
- public static String ClientAccessRegistryException_UI_1;
- public static String ClientAccessRegistryException_UI_0;
- public static String Snapshot_ERROR_0;
- public static String EditModelRegistry_ERROR_2;
- public static String EditModelRegistry_ERROR_1;
- public static String EditModelRegistry_ERROR_0;
- public static String AdapterFactoryDescriptor_ERROR_1;
- public static String AdapterFactoryDescriptor_ERROR_0;
- public static String DynamicAdapterFactory_ERROR_0;
- public static String ClientAccessRegistry_ERROR_1;
- public static String ClientAccessRegistry_ERROR_0;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, EMFWorkbenchEditResourceHandler.class);
- }
-
- public static String getString(String key, Object[] args) {
- return NLS.bind(key, args);
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EmfValidationHandler.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EmfValidationHandler.java
deleted file mode 100644
index 29f42c799..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EmfValidationHandler.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.wst.validation.internal.IValidationSelectionHandler;
-
-
-/**
- * Emf validation extension for valaditemenuaction
- */
-public class EmfValidationHandler implements IValidationSelectionHandler {
-
- private String validationType = null;
-
- /**
- * Default constructor
- */
- public EmfValidationHandler() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.common.frameworks.internal.IValidationSelectionHandler#getBaseValidationType(java.lang.Object)
- */
- public IResource getBaseValidationType(Object selection) {
- if (selection instanceof EObject) {
- EObject eObject = (EObject) selection;
- Resource resource = eObject.eResource();
- IProject project = ProjectUtilities.getProject(resource);
- return project;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.common.frameworks.internal.IValidationSelectionHandler#getValidationTypeString()
- */
- public String getValidationTypeString() {
- return validationType;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.common.frameworks.internal.IValidationSelectionHandler#setValidationTypeString(java.lang.String)
- */
- public void setValidationTypeString(String validationType) {
- this.validationType = validationType;
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/PassthruResourceSet.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/PassthruResourceSet.java
deleted file mode 100644
index 863e0dd5c..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/PassthruResourceSet.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench;
-
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-
-/**
- * This ResourceSet is to be used by plugins that are currently loading to a cached ResourceSet that
- * always loads relative to the Workbench. This ResourceSet will direct the loads to the appropriate
- * Project ResourceSet. It will only load in this ResourceSet if it was unable to load via the
- * Workspace.
- *
- * If you set want to used this ResourceSet so that the loaded resources are isolated from everyone
- * else, you should use the
- *
- * @link PassthruResourceSet(IProject) constructor. This will load all resources locally and it will
- * not delegate to another ProjectResourceSet. This would be equivalent to creating a
- * ProjectResourceSet without setting any handlers.
- *
- */
-public class PassthruResourceSet extends ProjectResourceSetImpl {
- protected boolean isIsolated = false;
-
- public class PassthruResourcesEList extends ResourceSetImpl.ResourcesEList {
- public boolean add(Object object) {
- if (object == null)
- return false;
- ResourceSet set = WorkbenchResourceHelperBase.getResourceSet(((Resource) object).getURI());
- if (set != null)
- return set.getResources().add(object);
-
- return super.add(object);
- }
-
-
- public boolean addAll(Collection collection) {
- if (collection.isEmpty())
- return false;
- Iterator it = collection.iterator();
- Resource res;
- while (it.hasNext()) {
- res = (Resource) it.next();
- if (!WorkbenchResourceHelperBase.cacheResource(res))
- super.add(res);
- }
- return true;
- }
- }
-
- public PassthruResourceSet() {
- isIsolated = false;
- }
-
- /**
- * This constructor should only be used if you want to use this ResourceSet isolated from the
- * actual cached ProjectResourcSet for the passed IProject.
- */
- public PassthruResourceSet(IProject project) {
- setProject(project);
- isIsolated = true;
- }
-
- public boolean isIsolated() {
- return isIsolated;
- }
-
- public Resource createResource(URI uri) {
- Resource result = WorkbenchResourceHelperBase.getExistingOrCreateResource(uri);
- if (result == null)
- return super.createResource(uri);
- return result;
- }
-
- /**
- * @see org.eclipse.emf.ecore.resource.impl.ResourceSetImpl#demandCreateResource(URI)
- */
- protected Resource demandCreateResource(URI uri) {
- Resource result = WorkbenchResourceHelperBase.createResource(uri);
- if (result == null)
- return super.createResource(uri); //We do want to call super.createResource and not
- // demandCreateResource
- return result;
- }
-
- /*
- * Javadoc copied from interface.
- */
- public EList getResources() {
- if (isIsolated)
- return super.getResources();
- if (resources == null) {
- resources = new PassthruResourcesEList();
- }
- return resources;
- }
-
- /**
- * @see org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl#createResourceFromHandlers(URI)
- */
- protected Resource createResourceFromHandlers(URI uri) {
- if (!isIsolated)
- return super.createResourceFromHandlers(uri);
- return null;
- }
-
- /**
- * @see org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl#getResourceFromHandlers(URI)
- */
- protected Resource getResourceFromHandlers(URI uri) {
- if (!isIsolated)
- return super.getResourceFromHandlers(uri);
- return null;
- }
-
- /**
- * @see com.ibm.etools.emf.workbench.ProjectResourceSetImpl#getEObjectFromHandlers(URI, boolean)
- */
- protected EObject getEObjectFromHandlers(URI uri, boolean loadOnDemand) {
- if (!isIsolated)
- return super.getEObjectFromHandlers(uri, loadOnDemand);
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/WorkbenchResourceHelper.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/WorkbenchResourceHelper.java
deleted file mode 100644
index dda3581e2..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/WorkbenchResourceHelper.java
+++ /dev/null
@@ -1,454 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 3, 2004
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.wst.common.internal.emfworkbench;
-
-import java.io.OutputStream;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.URIConverter;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-import org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter;
-import org.eclipse.jem.util.plugin.JEMUtilPlugin;
-import org.eclipse.wst.common.internal.emf.resource.ReferencedResource;
-import org.eclipse.wst.common.internal.emf.resource.ReferencedXMIFactoryImpl;
-import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
-
-/**
- * @author schacher
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class WorkbenchResourceHelper extends WorkbenchResourceHelperBase {
- protected static Class REFERENCED_RES_CLASS = ReferencedResource.class;
- private static boolean fileAdapterFactoryInitialized = false;
-
- private static class FileAdapterFactory extends AdapterFactoryImpl {
-
- public Adapter adaptNew(Notifier target, Object type) {
- FileAdapter adapter = new FileAdapter();
- adapter.setTarget(target);
- return adapter;
- }
-
- }
-
- /**
- * This class is internal and is used to store state on the resource, specifically, a cached
- * reference to the IFile
- */
- private static class FileAdapter extends AdapterImpl {
- public static final Object ADAPTER_KEY = FileAdapter.class.getName();
- private IFile file;
- private long synchronizationStamp;
- protected ResourceSet previousResourceSet;
- public static final int FILE_NOT_LOADED = 0;
- public static final int FILE_INACCESSIBLE = -1;
-
- public boolean isAdapterForType(Object type) {
- return ADAPTER_KEY.equals(type);
- }
-
- /*
- * Update the synchronization stamp where appropriate
- */
- public void notifyChanged(Notification msg) {
- switch (msg.getFeatureID(null)) {
- case Resource.RESOURCE__IS_LOADED :
- if (getResource().isLoaded())
- handleLoaded();
- else
- handleUnloaded();
- break;
- case ReferencedResource.RESOURCE_WAS_SAVED :
- handleSaved();
- break;
- case Resource.RESOURCE__URI :
- handleURIChanged();
- }
- }
-
- /**
- *
- */
- private void handleURIChanged() {
- file = null;
- synchronizationStamp = FILE_NOT_LOADED;
- }
-
- public IFile getFile() {
- //First test to see if we should reset the file.
- if (file != null && (!file.isAccessible() || previousResourceSet != getResourceSet())) {
- file = null;
- synchronizationStamp = FILE_NOT_LOADED;
- }
- if (file == null) {
- if (isPlatformResourceURI(getURI())) {
- file = getPlatformFile(getURI());
- } else {
- //we should not be here anymore.
- file = internalGetFile(getResource());
- }
- if(null!= file && !file.isAccessible()){
- synchronizationStamp = FILE_INACCESSIBLE;
- }
- previousResourceSet = getResourceSet();
- }
- return file;
- }
-
- /**
- * @return
- */
- public long getSynchronizationStamp() {
- return synchronizationStamp;
- }
-
- /**
- * @param file
- */
- public void setFile(IFile file) {
- this.file = file;
- }
-
- /**
- * @param l
- */
- public void setSynchronizationStamp(long l) {
- synchronizationStamp = l;
- }
-
- /**
- * @see ReferencedResource#isConsistent()
- */
- public boolean isConsistent() {
- if (getFile() == null || !getFile().isAccessible())
- return true;
- if (!getFile().isSynchronized(IResource.DEPTH_ZERO))
- return false;
- if (synchronizationStamp == FILE_NOT_LOADED)
- return true;
- return synchronizationStamp == computeModificationStamp(getFile());
-
- }
-
- public void cacheSynchronizationStamp() {
- setSynchronizationStamp(computeModificationStamp(getFile()));
- }
-
- public ReferencedResource getResource() {
- return (ReferencedResource) target;
- }
-
- public URI getURI() {
- return target == null ? null : getResource().getURI();
- }
-
- public ResourceSet getResourceSet() {
- return target == null ? null : getResource().getResourceSet();
- }
-
- public void handleUnloaded() {
- file = null;
- synchronizationStamp = FILE_NOT_LOADED;
- }
-
- public void handleLoaded() {
- cacheSynchronizationStamp();
- }
-
- public void handleSaved() {
- cacheSynchronizationStamp();
- }
- }
-
- /**
- * This is an internal method to be used by the plugin only
- */
- public static synchronized void initializeFileAdapterFactory() {
- if (!fileAdapterFactoryInitialized) {
- ReferencedXMIFactoryImpl.addGlobalAdapterFactory(new FileAdapterFactory());
- fileAdapterFactoryInitialized = true;
- }
- }
-
-
- private static FileAdapter getFileAdapter(ReferencedResource res) {
- FileAdapter adapter = (FileAdapter) EcoreUtil.getExistingAdapter(res, FileAdapter.ADAPTER_KEY);
- return adapter == null ? createFileAdapter(res) : adapter;
- }
-
- private static FileAdapter createFileAdapter(ReferencedResource res) {
- FileAdapter adapter = new FileAdapter();
- adapter.setTarget(res);
- res.eAdapters().add(adapter);
- return adapter;
- }
-
- /**
- * Return the underlying IFile for the resource if one exists. This may return null if the
- * resource does not belong to a ProjectResourceSet.
- */
- public static IFile getFile(ReferencedResource res) {
- FileAdapter adapter = getFileAdapter(res);
- return adapter == null ? null : adapter.getFile();
- }
-
- public static long getSynchronizationStamp(ReferencedResource res) {
- FileAdapter adapter = getFileAdapter(res);
- return adapter == null ? FileAdapter.FILE_NOT_LOADED : adapter.getSynchronizationStamp();
- }
-
- public static void setSynhronizationStamp(ReferencedResource res, long stamp) {
- FileAdapter adapter = getFileAdapter(res);
- if (adapter != null)
- adapter.setSynchronizationStamp(stamp);
- }
-
- public static boolean isConsistent(ReferencedResource res) {
- FileAdapter adapter = getFileAdapter(res);
- return adapter != null && adapter.isConsistent();
- }
-
- /**
- * Method cacheSynchronizationStamp.
- *
- * @param r
- */
- public static void cacheSynchronizationStamp(ReferencedResource refResource) {
- if (refResource != null) {
- FileAdapter adapter = getFileAdapter(refResource);
- if (adapter != null && adapter.getSynchronizationStamp() <= FileAdapter.FILE_NOT_LOADED)
- adapter.setSynchronizationStamp(computeModificationStamp(refResource));
- }
- }
-
- public static boolean isReferencedResource(Resource aResource) {
- return REFERENCED_RES_CLASS.isInstance(aResource);
- }
-
- public static long computeModificationStamp(ReferencedResource resource) {
- FileAdapter adapter = getFileAdapter(resource);
- return adapter == null ? FileAdapter.FILE_NOT_LOADED : computeModificationStamp(adapter.getFile());
- }
-
- public static long computeModificationStamp(IFile file) {
- if (file == null)
- return FileAdapter.FILE_NOT_LOADED;
- if(!file.isAccessible()){
- return FileAdapter.FILE_INACCESSIBLE;
- }
- long currentStamp = file.getModificationStamp();
- IPath path = file.getLocation();
- if (path != null)
- return path.toFile().lastModified();
- return currentStamp;
- }
-
- /**
- * Return the IFile that currently corresponds to <code>aResource</code>.
- */
- public static IFile getFile(Resource aResource) {
- if (aResource != null) {
- if (isReferencedResource(aResource))
- return getFile((ReferencedResource) aResource);
- return internalGetFile(aResource);
- }
- return null;
- }
-
- public static IFile getFile(EObject obj) {
- if (obj == null)
- return null;
-
- Resource mofResource = obj.eResource();
- if (mofResource == null)
- return null;
- return getFile(mofResource);
- }
-
- /**
- * Get or load a cached Resource or create one if it is not found. A WrappedException will only
- * be thrown if the corresponding file exists but it failed to load.
- */
- public static Resource getOrCreateResource(URI uri, ResourceSet set) throws WrappedException {
- try {
- return set.getResource(uri, true); //this will create the resource no matter what
- } catch (WrappedException e) {
- if (ExtendedEcoreUtil.getFileNotFoundDetector().isFileNotFound(e))
- return set.getResource(uri, false);
- throw e;
- }
- }
-
- protected static boolean isSameProject(Resource resourceA, Resource resourceB) {
- IProject pA, pB;
- pA = getProject(resourceA);
- pB = getProject(resourceB);
- if (pA != null && pB != null)
- return pA.equals(pB);
- //otherwise we do not have enough info to determine false so we must return true
- return true;
- }
-
- public static IProject getProject(Resource res) {
- IProject proj = getProject(res.getResourceSet());
- if (proj == null) {
- IFile file = getFile(res);
- if (file != null)
- proj = file.getProject();
- }
- return proj;
- }
-
- /*
- * This method should not be called by clients. It is used internally by clients that also call
- * getFile(...). This is to avoid endless loops.
- *
- * @see getFile(Resource)
- */
- protected static IFile internalGetFile(Resource aResource) {
- if (aResource != null)
- return getFile(aResource.getResourceSet(), aResource.getURI());
-
- return null;
- }
-
- protected static IFile getFile(ResourceSet set, URI uri) {
- IFile file = getPlatformFile(uri);
- if (file == null) {
- if (set != null) {
- URIConverter converter = set.getURIConverter();
- URI convertedUri = converter.normalize(uri);
- if (!uri.equals(convertedUri))
- return getPlatformFile(convertedUri);
- }
- }
- return file;
- }
-
- /**
- * Return the IFile for the <code>uri</code> within the Workspace. This URI is assumed to be
- * absolute in the following format: platform:/resource/....
- */
- public static IFile getPlatformFile(URI uri) {
- if (isPlatformResourceURI(uri)) {
- String fileString = URI.decode(uri.path());
- fileString = fileString.substring(JEMUtilPlugin.PLATFORM_RESOURCE.length() + 1);
- return getWorkspace().getRoot().getFile(new Path(fileString));
- }
- return null;
- }
-
-
-
- public static IFile getFile(IProject project, URI uri) {
- ResourceSet set = getResourceSet(project);
- return getFile(set, uri);
- }
-
- /**
- * This should only be used if you want to save <code>aResource</code> within the IProject
- * that it is currently residing but you do not want to save it in the default output location.
- * You should not use this api to save a Resource to an existing file.
- *
- * @deprecated This api is no longer required. You should create a resource with the absolute
- * path (platform:/resource/...). Upon save, the file will be saved to this
- * location.
- */
- public static boolean saveResourceToFile(Resource aResource, IFile aFile) throws Exception {
- return saveResourceToFile(aResource, aFile, null);
- }
-
- /**
- * This should only be used if you want to save <code>aResource</code> within the IProject
- * that it is currently residing but you do not want to save it in the default output location.
- * You should not use this api to save a Resource to an existing file.
- *
- * @deprecated This api is no longer required. You should create a resource with the absolute
- * path (platform:/resource/...). Upon save, the file will be saved to this
- * location.
- */
- public static boolean saveResourceToFile(Resource aResource, IFile aFile, Map saveOptions) throws Exception {
- if (aResource != null && aFile != null && !aFile.exists()) {
- ResourceSet set = aResource.getResourceSet();
- if (set != null) {
- URIConverter conv = set.getURIConverter();
- if (conv != null && conv instanceof WorkbenchURIConverter) {
- WorkbenchURIConverter wbConv = (WorkbenchURIConverter) conv;
- String uri = aResource.getURI().toString();
- IPath resPath, filePath;
- resPath = new Path(uri);
- filePath = aFile.getProjectRelativePath();
- int resCount, fileCount;
- resCount = resPath.segmentCount();
- fileCount = filePath.segmentCount();
- if (resCount <= fileCount) {
- filePath = filePath.removeFirstSegments(fileCount - resCount);
- if (resPath.equals(filePath)) {
- OutputStream os = wbConv.createOutputStream(URI.createPlatformResourceURI(aFile.toString()));
- if (os != null) {
- try {
- aResource.save(os, saveOptions);
- } finally {
- os.close();
- }
- return true;
- }
- }
- }
- }
- }
- }
- return false;
- }
-
- protected static void deleteFile(IFile aFile) throws CoreException {
- if (aFile != null && aFile.exists())
- aFile.delete(true, null);
- }
-
- /**
- * Delete
- *
- * @aResource in the Workbench.
- */
- public static void deleteResource(Resource aResource) throws CoreException {
- if (aResource != null)
- deleteFile(getFile(aResource));
- }
-
-
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/AdapterFactoryDescriptor.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/AdapterFactoryDescriptor.java
deleted file mode 100644
index 19ddf5ba8..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/AdapterFactoryDescriptor.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Feb 26, 2004
- *
- * To change the template for this generated file go to Window&gt;Preferences&gt;Java&gt;Code
- * Generation&gt;Code and Comments
- */
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jem.util.plugin.JEMUtilPlugin;
-import org.eclipse.wst.common.frameworks.internal.AbstractRegistryDescriptor;
-import org.eclipse.wst.common.internal.emf.utilities.Assert;
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchEditResourceHandler;
-
-
-public class AdapterFactoryDescriptor extends AbstractRegistryDescriptor implements Comparable {
-
- private String packageURI = null;
- private String id = null;
- private Set viewIDs = null;
- private final int loadOrder;
- private static int loadOrderCounter = 0;
-
- public AdapterFactoryDescriptor(IConfigurationElement element) {
- super(element);
-
- packageURI = element.getAttribute(AdapterFactoryRegistry.PACKAGE_URI);
- id = element.getAttribute(AdapterFactoryRegistry.ID);
- Assert.isNotNull(packageURI, EMFWorkbenchEditResourceHandler.AdapterFactoryDescriptor_ERROR_0); //$NON-NLS-1$
- Assert.isNotNull(id, EMFWorkbenchEditResourceHandler.getString(EMFWorkbenchEditResourceHandler.AdapterFactoryDescriptor_ERROR_1, new Object[]{element.getDeclaringExtension().getNamespace()})); //$NON-NLS-1$
-
- readViewIDs();
- this.loadOrder = loadOrderCounter++;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("AdapterFactoryDescriptor"); //$NON-NLS-1$
- sb.append('[');
- sb.append(packageURI);
- sb.append(",p"); //$NON-NLS-1$
- sb.append(getPriority());
- if (viewIDs != null && !viewIDs.isEmpty()) {
- sb.append(':');
- boolean first = true;
- Iterator iter = viewIDs.iterator();
- while (iter.hasNext()) {
- if (!first)
- sb.append(',');
- first = false;
- sb.append(iter.next());
- }
- }
- sb.append(']');
- return sb.toString();
- }
-
- private void readViewIDs() {
- viewIDs = new HashSet(3);
- IConfigurationElement[] children = element.getChildren(AdapterFactoryRegistry.VIEW);
- if (children == null || children.length == 0)
- return;
-
- String viewID = null;
- for (int i = 0; i < children.length; i++) {
- viewID = children[i].getAttribute(AdapterFactoryRegistry.ID);
- if (viewID != null)
- viewIDs.add(viewID);
- }
- }
-
- public AdapterFactory createInstance() {
- if (element == null)
- return null;
-
- AdapterFactory factory = null;
- try {
- factory = (AdapterFactory) element.createExecutableExtension(AdapterFactoryRegistry.CLASS_NAME);
- } catch (CoreException e) {
- JEMUtilPlugin.getLogger().logError(e);
- factory = null;
- }
- return factory;
- }
-
-
- public String getPackageURI() {
- return packageURI;
- }
-
- public Set getViewIDs() {
- return viewIDs;
- }
-
- public boolean appliesTo(String viewID) {
- return viewIDs.isEmpty() || viewIDs.contains(viewID);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Comparable#compareTo(java.lang.Object)
- */
- public int compareTo(Object o) {
- if (this == o)
- return 0;
- if (!(o instanceof AdapterFactoryDescriptor))
- return 1;
- AdapterFactoryDescriptor desc = (AdapterFactoryDescriptor) o;
-
- int pCompare = getPriority() - desc.getPriority();
- if (pCompare != 0)
- //We have reverse the sorting of the priority for the adapter factories
- return -pCompare;
-
- //The group is the same - in this case the one for a specific view has precedence over
- //a generic one
- else if (viewIDs != null && !viewIDs.isEmpty())
- return -1;
- else
- return 1;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.AbstractRegistryDescriptor#getID()
- */
- public String getID() {
- return id;
- }
-
-
- /**
- * @return Returns the loadOrder.
- */
- public int getLoadOrder() {
- return loadOrder;
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/AdapterFactoryRegistry.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/AdapterFactoryRegistry.java
deleted file mode 100644
index e98696291..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/AdapterFactoryRegistry.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeSet;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.jem.util.RegistryReader;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EMFWorkbenchEditPlugin;
-
-/**
- * @author mdelder
- */
-public class AdapterFactoryRegistry extends RegistryReader {
-
- public static final String ADAPTER_FACTORY = "adapterFactory"; //$NON-NLS-1$
-
- public static final String PACKAGE_URI = "packageURI"; //$NON-NLS-1$
-
- public static final String CLASS_NAME = "className"; //$NON-NLS-1$
-
- public static final String VIEW = "view"; //$NON-NLS-1$
-
- public static final String ID = "id"; //$NON-NLS-1$
-
- private Map descriptorMap = null;
-
- private static AdapterFactoryRegistry instance;
-
- private AdapterFactoryRegistry() {
- super(EMFWorkbenchEditPlugin.ID, EMFWorkbenchEditPlugin.ADAPTER_FACTORY_REGISTRY_EXTENSION_POINT);
- }
-
- public List getDescriptors(EPackage pkg, String viewID) {
- Collection all = getDescriptors(pkg);
- if (all == null)
- return null;
-
- Iterator iter = all.iterator();
- AdapterFactoryDescriptor desc = null;
- List result = new ArrayList(all.size());
- while (iter.hasNext()) {
- desc = (AdapterFactoryDescriptor) iter.next();
- if (desc.appliesTo(viewID))
- result.add(desc);
- }
- return result;
- }
-
- public Collection getDescriptors(EPackage registeredPackage) {
- return (Collection) getDescriptorMap().get(registeredPackage.getNsURI());
- }
-
- private Map getDescriptorMap() {
- if (descriptorMap == null)
- descriptorMap = new HashMap();
- return descriptorMap;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
- */
- public boolean readElement(IConfigurationElement element) {
- try {
- if (element.getName().equals(ADAPTER_FACTORY)) {
- AdapterFactoryDescriptor descriptor = new AdapterFactoryDescriptor(element);
- mapDescriptor(descriptor);
- return true;
- }
- } catch (RuntimeException re) {
- Logger.getLogger().logError(re);
- }
- return false;
- }
-
- private void mapDescriptor(AdapterFactoryDescriptor descriptor) {
- String uri = descriptor.getPackageURI();
- Collection descriptors = (Collection) getDescriptorMap().get(uri);
- if (descriptors == null) {
- descriptors = new TreeSet();
- getDescriptorMap().put(uri, descriptors);
- }
- descriptors.add(descriptor);
- }
-
- /**
- * @return Returns the instance.
- */
- public static AdapterFactoryRegistry instance() {
- if (instance == null) {
- instance = new AdapterFactoryRegistry();
- instance.readRegistry();
- }
- return instance;
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ChildCommand.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ChildCommand.java
deleted file mode 100644
index 6dec40e44..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ChildCommand.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.wst.common.internal.emfworkbench.integration.AbstractEditModelCommand;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EditModel;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EditModelCommand;
-
-/**
- * Insert the type's description here. Creation date: (05/22/01 8:57:56 AM)
- *
- * @author: Administrator
- */
-public class ChildCommand extends EditModelCommand {
- private ParentCommand parent;
- private EditModelRetriever modelRetriever;
-
- public ChildCommand(ParentCommand parentCmd, Command targetCmd, EditModelRetriever retriever) {
- super(targetCmd);
- parent = parentCmd;
- modelRetriever = retriever;
- }
-
- public boolean canExecute() {
- return true;
- }
-
- /**
- * Does nothing
- */
- public void execute() {
- //does nothing
- }
-
- protected void executeInModel(AbstractEditModelCommand cmd) {
- EditModel model = modelRetriever.getEditModelForWrite(this);
- try {
- model.getCommandStack().execute(cmd);
- model.saveIfNecessary(this);
- } finally {
- model.releaseAccess(this);
- }
- }
-
- /**
- * Insert the method's description here. Creation date: (05/22/01 9:35:36 AM)
- *
- * @return java.lang.Object
- */
- public java.lang.Object getEditModelKey() {
- return modelRetriever.getEditModelID();
- }
-
- /**
- * Insert the method's description here. Creation date: (05/22/01 9:35:36 AM)
- *
- * @return com.ibm.etools.j2ee.workbench.ParentCommand
- */
- public ParentCommand getParent() {
- return parent;
- }
-
- public void redo() {
- redoInModel();
- getParent().redoFrom(this);
- }
-
- protected void redoInModel() {
- EditModel model = modelRetriever.getEditModelForWrite(this);
- try {
- getTarget().redo();
- model.saveIfNecessary(this);
- } finally {
- model.releaseAccess(this);
- }
- }
-
- public void undo() {
- undoInModel();
- getParent().undoFrom(this);
- }
-
- protected void undoInModel() {
- EditModel model = modelRetriever.getEditModelForWrite(this);
- try {
- getTarget().undo();
- model.saveIfNecessary(this);
- } finally {
- model.releaseAccess(this);
- }
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ClientAccessRegistry.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ClientAccessRegistry.java
deleted file mode 100644
index 61f985814..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ClientAccessRegistry.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Oct 6, 2003
- */
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.WeakHashMap;
-
-import org.eclipse.jem.internal.util.emf.workbench.nls.EMFWorkbenchResourceHandler;
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchEditResourceHandler;
-
-/**
- * @author mdelder
- */
-public class ClientAccessRegistry {
-
- protected final WeakHashMap registry = new WeakHashMap();
- protected final Set baseSet = new HashSet();
-
- public synchronized void access(Object accessorKey) {
- if (isStable()) {
- if (!registry.containsKey(accessorKey)) {
- Snapshot snapshot = new Snapshot();
- this.registry.put(accessorKey, snapshot);
- this.baseSet.add(snapshot);
-
- } else
- throw new ClientAccessRegistryException(EMFWorkbenchEditResourceHandler.ClientAccessRegistry_ERROR_0, accessorKey); //$NON-NLS-1$
-
- } else
- complain();
- }
-
- public synchronized void release(Object accessorKey) {
-
- /*
- * Error condition: Some one has been naughty and not released the resource
- */
- if (this.registry.containsKey(accessorKey) && isStable()) {
- Snapshot snapshot = (Snapshot) this.registry.remove(accessorKey);
- this.baseSet.remove(snapshot);
- } else
- complain(accessorKey);
- }
-
- public synchronized void assertAccess(Object accessorKey) {
- if (!isClientAccessing(accessorKey))
- throw new ClientAccessRegistryException(EMFWorkbenchResourceHandler.getString("ClientAccessRegistry_ERROR_1"), accessorKey); //$NON-NLS-1$
- }
-
- public synchronized boolean isClientAccessing(Object client) {
- boolean result = this.registry.containsKey(client);
- if (!isStable())
- complain();
- return result;
- }
-
- public synchronized boolean isAnyClientAccessing() {
- boolean result = this.registry.size() > 0;
- if (!isStable())
- complain();
- return result;
- }
-
- public synchronized boolean isStable() {
- return this.baseSet.size() == this.registry.size();
- }
-
- public void complain() {
- complain(null);
- }
-
- public void complain(Object accessorKey) {
- if (!isStable())
- throw new ClientAccessRegistryException(this.registry, this.baseSet);
- throw new ClientAccessRegistryException(EMFWorkbenchResourceHandler.getString("ClientAccessRegistry_ERROR_1"), accessorKey); //$NON-NLS-1$
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer("ClientAccessRegistry: ["); //$NON-NLS-1$
- result.append((isStable()) ? "STABLE" : "OUT OF SYNC"); //$NON-NLS-1$ //$NON-NLS-2$
- result.append("]: Reference Count = "); //$NON-NLS-1$
- result.append(this.size());
- return result.toString();
- }
-
- public synchronized int size() {
- return this.registry.size();
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ClientAccessRegistryException.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ClientAccessRegistryException.java
deleted file mode 100644
index 9844b9b8f..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ClientAccessRegistryException.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Oct 2, 2003
- *
- */
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.WeakHashMap;
-
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchEditResourceHandler;
-
-
-/**
- * The ClientAccessRegistryException accepts a WeakHashSet registry and a Set of all Snapshots that
- * should be contained in the registry. It will perform the necessary set difference in order to
- * determine which Snapshots exist in the baseSet but not in the registry.
- *
- * @author mdelder
- */
-public class ClientAccessRegistryException extends RuntimeException {
-
- public static final int UNKNOWN = 0;
- public static final int DANGLING_REFERENCE = 1;
- public static final int INVALID_ACCESS_KEY = 2;
- private WeakHashMap registry = null;
- private Set baseSet = null;
- private boolean processed = false;
- private int type = UNKNOWN;
-
- public ClientAccessRegistryException(WeakHashMap registry, Set baseSet) {
- this.registry = registry;
- this.baseSet = new HashSet();
- this.baseSet.addAll(baseSet);
- this.type = DANGLING_REFERENCE;
- }
-
- public ClientAccessRegistryException(String msg, Object key) {
- super(msg + " : " + key); //$NON-NLS-1$
- this.type = INVALID_ACCESS_KEY;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Throwable#printStackTrace(java.io.PrintStream)
- */
- public void printStackTrace(PrintStream s) {
-
- s.println(toString());
- super.printStackTrace(s);
-
- if (this.registry != null) {
- Snapshot snapshot = null;
- if (!processed) {
- Object key = null;
- Iterator keyIterator = this.registry.keySet().iterator();
- while (keyIterator.hasNext()) {
- key = keyIterator.next();
- snapshot = (Snapshot) this.registry.get(key);
- this.baseSet.remove(snapshot);
- }
- processed = true;
- }
- s.println(EMFWorkbenchEditResourceHandler.getString(EMFWorkbenchEditResourceHandler.ClientAccessRegistryException_UI_0, new Object[]{new Integer(baseSet.size()).toString()})); //$NON-NLS-1$
-
- for (Iterator possibleCulpritsItr = baseSet.iterator(); possibleCulpritsItr.hasNext();) {
- snapshot = (Snapshot) possibleCulpritsItr.next();
- snapshot.printStackTrace(s);
- }
-
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Throwable#printStackTrace(java.io.PrintWriter)
- */
- public void printStackTrace(PrintWriter s) {
-
- s.println(toString());
- super.printStackTrace(s);
- if (this.registry != null) {
- Snapshot snapshot = null;
- if (!processed) {
- Object key = null;
- Iterator keyIterator = this.registry.keySet().iterator();
- while (keyIterator.hasNext()) {
- key = keyIterator.next();
- snapshot = (Snapshot) this.registry.get(key);
- this.baseSet.remove(snapshot);
- }
- processed = true;
- }
- s.println(EMFWorkbenchEditResourceHandler.getString("", new Object[]{new Integer(baseSet.size()).toString()})); //$NON-NLS-1$
-
- for (Iterator possibleCulpritsItr = baseSet.iterator(); possibleCulpritsItr.hasNext();) {
- snapshot = (Snapshot) possibleCulpritsItr.next();
- snapshot.printStackTrace(s);
- }
-
- }
- }
-
- public String getType() {
- switch (type) {
- case DANGLING_REFERENCE :
- return "DANGLING_REFERENCE"; //$NON-NLS-1$
- case INVALID_ACCESS_KEY :
- return "INVALID_ACCESS_KEY"; //$NON-NLS-1$
- default :
- return "UNKNOWN"; //$NON-NLS-1$
- }
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer(super.toString()).append("\r\n"); //$NON-NLS-1$
- result.append(EMFWorkbenchEditResourceHandler.getString(EMFWorkbenchEditResourceHandler.ClientAccessRegistryException_UI_1, new Object[]{getType()})); //$NON-NLS-1$
- // if (this.badReferenceLocation != null) {
- // result.append("The invalid access occurred somewhere in the following stack
- // trace.").append("\n");
- // result.append(this.badReferenceLocation.getStackTraceString());
- // }
- return result.toString();
- }
-
- public static void main(String[] args) {
- System.out.println(new ClientAccessRegistryException("test message", "-somekeyobj-").toString()); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("LINEBREAK"); //$NON-NLS-1$
- System.out.println(new ClientAccessRegistryException(new WeakHashMap(), new HashSet()).toString());
- System.out.println("LINEBREAK"); //$NON-NLS-1$
- new ClientAccessRegistryException("test message", "-somekeyobj-").printStackTrace(); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("LINEBREAK"); //$NON-NLS-1$
- new ClientAccessRegistryException(new WeakHashMap(), new HashSet()).printStackTrace();
-
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EMFWorkbenchEditContextFactory.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EMFWorkbenchEditContextFactory.java
deleted file mode 100644
index 7131dae9f..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EMFWorkbenchEditContextFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 3, 2004
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.jem.internal.util.emf.workbench.EMFWorkbenchContextFactory;
-import org.eclipse.jem.util.emf.workbench.EMFWorkbenchContextBase;
-import org.eclipse.jem.util.emf.workbench.ResourceSetWorkbenchSynchronizer;
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext;
-import org.eclipse.wst.common.internal.emfworkbench.integration.ResourceSetWorkbenchEditSynchronizer;
-
-/**
- * @author schacher
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class EMFWorkbenchEditContextFactory extends EMFWorkbenchContextFactory {
- /**
- *
- */
- public EMFWorkbenchEditContextFactory() {
- super();
- }
-
- protected EMFWorkbenchContextBase primCreateEMFContext(IProject aProject) {
- return new EMFWorkbenchContext(aProject);
- }
-
- public ResourceSetWorkbenchSynchronizer createSynchronizer(ResourceSet aResourceSet, IProject aProject) {
- return new ResourceSetWorkbenchEditSynchronizer(aResourceSet, aProject);
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelExtension.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelExtension.java
deleted file mode 100644
index 6041defe8..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelExtension.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Feb 18, 2004
- *
- * To change the template for this generated file go to Window&gt;Preferences&gt;Java&gt;Code
- * Generation&gt;Code and Comments
- */
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.frameworks.internal.ConfigurationElementWrapper;
-
-
-public class EditModelExtension extends ConfigurationElementWrapper {
- public static final String ID_ATTR = "id"; //$NON-NLS-1$
-
- private String editModelID = null;
- private Collection resources = null;
- private String id = null;
-
-
- public EditModelExtension(IConfigurationElement element) {
- super(element);
- init();
- }
-
- private void init() {
- id = element.getAttribute(ID_ATTR);
- if (id == null) {
- Logger.getLogger().logError("Incorrect usage of editModelExtension extension point. Element must contain id attribute. Plugin: " + getPluginId()); //$NON-NLS-1$
- return;
- }
-
- editModelID = element.getAttribute(EditModelExtensionRegistry.EDIT_MODEL_ID_ATTR);
- resources = new ArrayList();
- IConfigurationElement[] editModelResources = element.getChildren(EditModelResource.EDIT_MODEL_RESOURCE_ELEMENT);
- for (int j = 0; j < editModelResources.length; j++)
- resources.add(new EditModelResource(editModelResources[j], id));
- }
-
- /**
- * @return
- */
- public String getEditModelID() {
- return editModelID;
- }
-
-
- /**
- * @return
- */
- public Collection getResources() {
- return resources;
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelExtensionRegistry.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelExtensionRegistry.java
deleted file mode 100644
index 47bc51b0f..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelExtensionRegistry.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jem.util.RegistryReader;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EMFWorkbenchEditPlugin;
-
-
-/**
- * @author mdelder
- */
-class EditModelExtensionRegistry extends RegistryReader {
-
- private static EditModelExtensionRegistry INSTANCE = null;
-
- public static final String EDIT_MODEL_EXT_ELEMENT = "editModelExtension"; //$NON-NLS-1$
- public static final String EDIT_MODEL_ID_ATTR = "editModelID"; //$NON-NLS-1$
- public static final String GROUP_ID_ATTR = "functionGroupID"; //$NON-NLS-1$
-
-
- private Map extensions = null;
-
- protected EditModelExtensionRegistry() {
- super(EMFWorkbenchEditPlugin.ID, EMFWorkbenchEditPlugin.EDIT_MODEL_EXTENSION_REGISTRY_EXTENSION_POINT);
- }
-
- public static EditModelExtensionRegistry getInstance() {
- if (INSTANCE == null) {
- INSTANCE = new EditModelExtensionRegistry();
- INSTANCE.readRegistry();
- }
- return INSTANCE;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
- */
- public boolean readElement(IConfigurationElement element) {
-
- boolean result = false;
- Collection extensionsByID = null;
- EditModelExtension editModelExtension = null;
- if (element.getName().equals(EDIT_MODEL_EXT_ELEMENT)) {
- editModelExtension = new EditModelExtension(element);
- extensionsByID = (Collection) getExtensions().get(editModelExtension.getEditModelID());
- if (extensionsByID == null) {
- extensionsByID = new ArrayList();
- getExtensions().put(editModelExtension.getEditModelID(), extensionsByID);
- }
- extensionsByID.add(editModelExtension);
- result = true;
- }
- return result;
- }
-
- protected Map getExtensions() {
- if (extensions == null)
- extensions = new HashMap();
- return extensions;
- }
-
- /**
- * @return
- */
- public Collection getEditModelResources(Object editModelID) {
- //TODO - Cache the resources
- Collection editModelResources = new ArrayList();
- Collection editModelExtensions = (Collection) getExtensions().get(editModelID);
-
- if (editModelExtensions == null || editModelExtensions.size() == 0)
- return Collections.EMPTY_LIST;
- Iterator itr = editModelExtensions.iterator();
- while (itr.hasNext()) {
- EditModelExtension ext = (EditModelExtension) itr.next();
- editModelResources.addAll(ext.getResources());
- }
- return (!editModelExtensions.isEmpty()) ? editModelResources : Collections.EMPTY_LIST;
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRegistry.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRegistry.java
deleted file mode 100644
index 0b88fa650..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRegistry.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeSet;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jem.util.RegistryReader;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext;
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchEditResourceHandler;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EMFWorkbenchEditPlugin;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EditModel;
-import org.eclipse.wst.common.internal.emfworkbench.integration.IEditModelFactory;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-/**
- * @author mdelder
- */
-public class EditModelRegistry extends RegistryReader {
-
- private final static EditModelRegistry INSTANCE = new EditModelRegistry();
-
- private final Map factoryConfigurations = new HashMap();
- private static boolean initialized = false;
-
-
- public static final String EDIT_MODEL_ELEMENT = "editModel"; //$NON-NLS-1$
- public static final String EDIT_MODEL_ID_ATTR = "editModelID"; //$NON-NLS-1$
- public static final String FACTORY_CLASS_ATTR = "factoryClass"; //$NON-NLS-1$
- public static final String PARENT_MODEL_ATTR = "parentModelID"; //$NON-NLS-1$
-
-
-
- public static final String LOAD_UNKNOWN_RESOURCES_ATTR = "loadUnknownResourcesAsReadOnly"; //$NON-NLS-1$
-
- protected EditModelRegistry() {
- super(EMFWorkbenchEditPlugin.ID, EMFWorkbenchEditPlugin.EDIT_MODEL_FACTORIES_EXTENSION_POINT);
- }
-
- public static EditModelRegistry getInstance() {
- if(isInitialized())
- return INSTANCE;
- synchronized(INSTANCE) {
- if(!isInitialized()) {
- INSTANCE.readRegistry();
- initialized = true;
- }
- }
- return INSTANCE;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
- */
- public boolean readElement(IConfigurationElement element) {
- /*
- * The EditModel Extension Point defines Configuration elements named "editModel" with
- * attributes "editModelID" and "factoryClass"
- */
- boolean result = false;
- if (element.getName().equals(EDIT_MODEL_ELEMENT)) {
- String editModelID = element.getAttribute(EDIT_MODEL_ID_ATTR);
- if (editModelID != null) {
- this.factoryConfigurations.put(editModelID, new EditModelInfo(editModelID, element));
- result = true;
- }
- }
- return result;
- }
-
- public String getCacheID(String editModelID, Map params) {
- IEditModelFactory factory = getEditModelFactoryByKey(editModelID);
- return factory.getCacheID(editModelID, params);
- }
-
- public EditModel createEditModelForRead(String editModelID, EMFWorkbenchContext context, Map params) {
- return getEditModelFactoryByKey(editModelID).createEditModelForRead(editModelID, context, params);
- }
-
- public EditModel createEditModelForWrite(String editModelID, EMFWorkbenchContext context, Map params) {
- return getEditModelFactoryByKey(editModelID).createEditModelForWrite(editModelID, context, params);
- }
-
- public Collection getEditModelResources(String editModelID) {
- Collection resources = new TreeSet();
-
- EditModelInfo nextEditModelInfo = (EditModelInfo) factoryConfigurations.get(editModelID);
-
- String parentModelID = null;
- Map visitedEditModels = new HashMap();
- /* collect the resources from the parents */
- while (nextEditModelInfo != null && (parentModelID = nextEditModelInfo.getParentModelID()) != null) {
- if (visitedEditModels.containsKey(parentModelID))
- throw new IllegalStateException(EMFWorkbenchEditResourceHandler.getString(EMFWorkbenchEditResourceHandler.EditModelRegistry_ERROR_0, new Object[]{editModelID})); //$NON-NLS-1$
- visitedEditModels.put(parentModelID, null);
- resources.addAll(getAllEditModelResources(parentModelID));
- nextEditModelInfo = (EditModelInfo) factoryConfigurations.get(parentModelID);
- }
-
- /* Get the resources for the actual edit model id */
- resources.addAll(getAllEditModelResources(editModelID));
-
- return resources;
- }
-
- public IEditModelFactory findEditModelFactoryByKey(Object editModelID) {
- IEditModelFactory factory = null;
- EditModelInfo editMdlInfo = (EditModelInfo) factoryConfigurations.get(editModelID);
- if (editMdlInfo != null)
- factory = editMdlInfo.getEditModelFactory();
- return factory;
- }
-
- public IEditModelFactory findEditModelFactoryByProject(IProject project) {
- IFacetedProject facetedProject = null;
- try {
- facetedProject = ProjectFacetsManager.create(project);
- } catch (Exception e) {
- return null;
- }
- if (facetedProject == null) return null;
- Iterator keys = factoryConfigurations.keySet().iterator();
- while (keys.hasNext()) {
- Object key = keys.next();
- if (key instanceof String) {
- try {
- IProjectFacet projectFacet = ProjectFacetsManager.getProjectFacet((String)key);
- if (projectFacet != null && facetedProject.hasProjectFacet(projectFacet))
- return findEditModelFactoryByKey(key);
- } catch (Exception e) {
- continue;
- }
-
- }
- }
-
- return null;
- }
-
- protected Collection getAllEditModelResources(String editModelID) {
- Collection resources = new ArrayList();
- resources.addAll(getLocalEditModelResources(editModelID));
- resources.addAll(getExtendedEditModelResources(editModelID));
- return resources;
- }
-
- protected Collection getLocalEditModelResources(String editModelID) {
- EditModelInfo editMdlInfo = (EditModelInfo) factoryConfigurations.get(editModelID);
- return (editMdlInfo != null) ? editMdlInfo.getEditModelResources() : Collections.EMPTY_LIST;
- }
-
- protected Collection getExtendedEditModelResources(String editModelID) {
- return EditModelExtensionRegistry.getInstance().getEditModelResources(editModelID);
- }
-
- /**
- * @param editModelKey
- * the editModelID of a given EditModelFactory defined in the Extension Point
- * @throws IllegalArgumentException
- * if a IEditModelFactory cannot be found for the given ID.
- * @return the EditModelFactory associated with a given EditModelID
- */
- protected IEditModelFactory getEditModelFactoryByKey(Object editModelID) {
- IEditModelFactory factory = null;
- EditModelInfo editMdlInfo = (EditModelInfo) factoryConfigurations.get(editModelID);
- if (editMdlInfo != null)
- factory = editMdlInfo.getEditModelFactory();
- else
- throw new IllegalArgumentException(EMFWorkbenchEditResourceHandler.getString(EMFWorkbenchEditResourceHandler.EditModelRegistry_ERROR_2, new Object[]{editModelID})); //$NON-NLS-1$
-
- return factory;
- }
-
-
-
- public class EditModelInfo {
-
- private String editModelID = null;
- private IConfigurationElement configurationElement = null;
-
- private IEditModelFactory factory = null;
- private List editModelResources = null;
-
- private String parentModelID = null;
-
- private String tostringCache = null;
-
- public EditModelInfo(String editModelID, IConfigurationElement configurationElement) {
-
- this.configurationElement = configurationElement;
- this.editModelID = editModelID;
- this.parentModelID = this.configurationElement.getAttribute(PARENT_MODEL_ATTR);
- }
-
-
- public List getEditModelResources() {
- /* this method is guarded */
- initializeResources();
- return editModelResources;
- }
-
- public IEditModelFactory getEditModelFactory() {
- if (this.factory == null) {
- if (this.configurationElement != null) {
- try {
- this.factory = (IEditModelFactory) this.configurationElement.createExecutableExtension(FACTORY_CLASS_ATTR);
- String loadUnknownResourceAsReadOnly = this.configurationElement.getAttribute(LOAD_UNKNOWN_RESOURCES_ATTR);
- Boolean value = loadUnknownResourceAsReadOnly != null ? Boolean.valueOf(loadUnknownResourceAsReadOnly) : Boolean.FALSE;
- this.factory.setLoadKnownResourcesAsReadOnly(value.booleanValue());
- discardConfigurationElementIfNecessary();
- } catch (CoreException e) {
- Logger.getLogger(EMFWorkbenchEditPlugin.ID).logError(e);
- }
- } else {
- Logger.getLogger().logError(EMFWorkbenchEditResourceHandler.EditModelRegistry_ERROR_1); //$NON-NLS-1$
- }
- }
- return this.factory;
- }
-
- private void initializeResources() {
-
- if (editModelResources == null) {
- if (configurationElement != null) {
-
- editModelResources = new ArrayList();
-
- IConfigurationElement[] resources = configurationElement.getChildren(EditModelResource.EDIT_MODEL_RESOURCE_ELEMENT);
- for (int j = 0; j < resources.length; j++)
- editModelResources.add(new EditModelResource(resources[j]));
-
- discardConfigurationElementIfNecessary();
- } else {
- editModelResources = Collections.EMPTY_LIST;
- }
- }
- }
-
- private void discardConfigurationElementIfNecessary() {
- if (this.editModelResources != null && this.factory != null)
- this.configurationElement = null;
- }
-
- public String toString() {
- if (tostringCache == null)
- tostringCache = "EditModelID: {" + this.editModelID + "}, Parent Model ID {" + this.parentModelID + "}, Configuration Element: [" + this.configurationElement + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
- return tostringCache;
- }
-
- /**
- * @return Returns the parentModelID.
- */
- public String getParentModelID() {
- return parentModelID;
- }
-
- }
- /**
- * @return Returns the initialized.
- */
- protected static boolean isInitialized() {
- return initialized;
- }
-
- public String[] getRegisteredEditModelIDs() {
- return (String[]) factoryConfigurations.keySet().toArray(new String[factoryConfigurations.keySet().size()]);
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelResource.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelResource.java
deleted file mode 100644
index b5543ace6..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelResource.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-/*
- * Created on Feb 5, 2004
- *
- * To change the template for this generated file go to Window&gt;Preferences&gt;Java&gt;Code
- * Generation&gt;Code and Comments
- */
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.wst.common.frameworks.internal.AbstractRegistryDescriptor;
-
-
-
-public class EditModelResource extends AbstractRegistryDescriptor implements Comparable {
- public static final String EDIT_MODEL_URI_ATTR = "URI"; //$NON-NLS-1$
- public static final String AUTO_LOAD_ATTR = "autoload"; //$NON-NLS-1$
- public static final String EDIT_MODEL_RESOURCE_ELEMENT = "editModelResource"; //$NON-NLS-1$
-
- private static int loadOrderCounter = 1;
- private URI uri;
- private boolean autoload = false;
- //Indicates if this was defined as part of the edit model,
- //as opposed to an extension
- private boolean isCore = true;
-
- private String extensionID;
-
- private int loadOrder;
-
- public EditModelResource(IConfigurationElement element) {
- super(element);
- String strUri = element.getAttribute(EDIT_MODEL_URI_ATTR);
- if (strUri != null)
- EditModelResource.this.uri = URI.createURI(strUri);
-
- String strLoad = element.getAttribute(AUTO_LOAD_ATTR);
- if (strLoad != null)
- autoload = Boolean.valueOf(strLoad).booleanValue();
- loadOrder = loadOrderCounter++;
- }
-
- public EditModelResource(IConfigurationElement element, String extensionID) {
- this(element);
- this.extensionID = extensionID;
- isCore = false;
- }
-
- public URI getURI() {
- return uri;
- }
-
- public boolean isAutoLoad() {
- return autoload;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.AbstractRegistryDescriptor#getID()
- */
- public String getID() {
- return extensionID;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.AbstractRegistryDescriptor#getPriority()
- */
- public int getPriority() {
- if (isCore)
- return 0;
- return super.getPriority();
- }
-
- /**
- * return whether this resource is defined as part of the edit model definition as opposed to an
- * extension
- */
- public boolean isCore() {
- return isCore;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Comparable#compareTo(java.lang.Object)
- */
- public int compareTo(Object o) {
- if (!(o instanceof EditModelResource))
- return 1;
- EditModelResource res = (EditModelResource) o;
- int value = getPriority() - res.getPriority();
- if (value == 0)
- return loadOrder - res.loadOrder;
- return value;
- }
-
- /**
- * @return Returns the loadOrder.
- */
- public int getLoadOrder() {
- return loadOrder;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRetriever.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRetriever.java
deleted file mode 100644
index 8efb8c15f..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRetriever.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-import java.util.Map;
-
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EditModel;
-
-
-
-public class EditModelRetriever {
- private EMFWorkbenchContext context;
- private String editModelID;
- private Map editModelParms;
-
- /**
- * EditModelRetriever constructor comment.
- */
- public EditModelRetriever(EMFWorkbenchContext context, String editModelKey, Map parms) {
- super();
- this.context = context;
- editModelID = editModelKey;
- editModelParms = parms;
- }
-
- public EditModel getEditModelForRead(Object accessorKey) {
- return context.getEditModelForRead(getEditModelID(), accessorKey, editModelParms);
- }
-
- public EditModel getEditModelForWrite(Object accessorKey) {
- return context.getEditModelForWrite(getEditModelID(), accessorKey, editModelParms);
- }
-
- public String getEditModelID() {
- return editModelID;
- }
-
- public EMFWorkbenchContext context() {
- return context;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ExtendedComposedAdapterFactory.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ExtendedComposedAdapterFactory.java
deleted file mode 100644
index 8f26cf3bf..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ExtendedComposedAdapterFactory.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Dec 3, 2003
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.jem.util.logger.proxy.Logger;
-
-/**
- * @author schacher
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class ExtendedComposedAdapterFactory extends ComposedAdapterFactory {
-
- /**
- * @param adapterFactory
- */
- public ExtendedComposedAdapterFactory(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * @param adapterFactories
- */
- public ExtendedComposedAdapterFactory(AdapterFactory[] adapterFactories) {
- super(adapterFactories);
- }
-
- /**
- * @param adapterFactories
- */
- public ExtendedComposedAdapterFactory(Collection adapterFactories) {
- super(adapterFactories);
- }
-
- /*
- * overrode from the super class, changed not to check supertypes of the EObject, because that
- * will be handled by the DynamicAdapterFactory
- *
- * @see org.eclipse.emf.common.notify.AdapterFactory#adapt(org.eclipse.emf.common.notify.Notifier,
- * java.lang.Object)
- */
- public Adapter adapt(Notifier target, Object type) {
- Adapter result = null;
-
- if (target instanceof EObject) {
- EObject eObject = (EObject) target;
- EClass eClass = eObject.eClass();
- if (eClass != null) {
- EPackage ePackage = eClass.getEPackage();
- Collection types = new ArrayList();
- types.add(ePackage);
- if (type != null) {
- types.add(type);
- }
- /* when an error occurs, remove the delegate and try again */
- boolean attemptAdaptAgain = true;
- while (result == null && attemptAdaptAgain) {
- attemptAdaptAgain = false;
- AdapterFactory delegateAdapterFactory = getFactoryForTypes(types);
- if (delegateAdapterFactory != null) {
- try {
- result = delegateAdapterFactory.adapt(target, type);
- } catch (RuntimeException re) {
- Logger.getLogger().logError(re);
- adapterFactories.remove(delegateAdapterFactory);
- attemptAdaptAgain = true;
- }
- }
- }
- }
- } else {
- result = adapt(target, type, new HashSet(), target.getClass());
- }
-
- return result;
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/InvertedCommand.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/InvertedCommand.java
deleted file mode 100644
index 2bbcb111d..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/InvertedCommand.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.wst.common.internal.emfworkbench.integration.AbstractEditModelCommand;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EditModelCommand;
-
-/**
- * Insert the type's description here. Creation date: (05/22/01 8:58:24 AM)
- *
- * @author: Administrator
- */
-public class InvertedCommand extends AbstractEditModelCommand {
- public InvertedCommand(Command targetCommand) {
- super(targetCommand);
- }
-
- public boolean canExecute() {
- return getTarget().canUndo();
- }
-
- public boolean canUndo() {
- return getTarget().canExecute();
- }
-
- /**
- * Does nothing
- */
- public void execute() {
- //does nothing
- }
-
- /**
- * getEditModelCommand method comment.
- */
- public EditModelCommand getEditModelCommand() {
- return ((AbstractEditModelCommand) getTarget()).getEditModelCommand();
- }
-
- protected int inversionDepth() {
- if (getEditModelCommand() == getTarget())
- return 1;
- return ((InvertedCommand) getTarget()).inversionDepth() + 1;
- }
-
- protected String labelPrefix() {
- return inversionDepth() % 2 == 1 ? "Undo " : "Redo ";//$NON-NLS-2$//$NON-NLS-1$
- }
-
- public void redo() {
- getTarget().undo();
- }
-
- public void undo() {
- getTarget().redo();
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ParentCommand.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ParentCommand.java
deleted file mode 100644
index 9c7dc906b..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ParentCommand.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.wst.common.internal.emfworkbench.integration.AbstractEditModelCommand;
-import org.eclipse.wst.common.internal.emfworkbench.integration.ComposedEditModel;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EditModel;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EditModelCommand;
-
-/**
- * Insert the type's description here. Creation date: (05/22/01 8:57:38 AM)
- *
- * @author: Administrator
- */
-public class ParentCommand extends EditModelCommand {
- private List children;
- private ComposedEditModel editModel;
- private List affectedModels;
-
- public ParentCommand(Command targetCommand, ComposedEditModel anEditModel) {
- super(targetCommand);
- editModel = anEditModel;
- children = new ArrayList(1);
- }
-
- public boolean canExecute() {
- return getTarget().canExecute();
- }
-
- protected void computeAffectedModels() {
- ResourceSet set = null;
- List editModels = getEditModel().getChildren();
- Iterator it = computeAffectedResourceSets().iterator();
- while (it.hasNext()) {
- set = (ResourceSet) it.next();
- for (int i = 0; i < editModels.size(); i++) {
- EditModel model = (EditModel) editModels.get(i);
- if (model.getResourceSet() == set) {
- getAffectedModels().add(new EditModelRetriever(model.getEmfContext(), model.getEditModelID(), model.getParams()));
- continue;
- }
- }
- }
- }
-
- protected Set computeAffectedResourceSets() {
- Iterator objects = getTarget().getAffectedObjects().iterator();
- Set resourceSets = new HashSet();
- Object o = null;
- EObject ref = null;
- ResourceSet set = null;
- while (objects.hasNext()) {
- o = objects.next();
- if (!(o instanceof EObject))
- continue;
- ref = (EObject) o;
- if (ref.eResource() != null) {
- set = ref.eResource().getResourceSet();
- if (set != null)
- resourceSets.add(set);
- }
- }
- return resourceSets;
- }
-
- protected ChildCommand createChildCommand(EditModelRetriever retriever) {
- return new ChildCommand(this, getTarget(), retriever);
- }
-
- public void execute() {
- getTarget().execute();
- computeAffectedModels();
- pushChildrenForExecute();
- }
-
- protected void executeInModel(AbstractEditModelCommand cmd) {
- getEditModel().getCommandStack().execute(cmd);
- }
-
- protected List getAffectedModels() {
- if (affectedModels == null)
- affectedModels = new ArrayList(1);
- return affectedModels;
- }
-
- protected List getChildren() {
- return children;
- }
-
- protected ComposedEditModel getEditModel() {
- return editModel;
- }
-
- protected void invertChildren() {
- invertChildrenExcept((ChildCommand) null);
- }
-
- protected void invertChildrenExcept(ChildCommand caller) {
- for (int i = 0; i < children.size(); i++) {
- ChildCommand childCmd = (ChildCommand) children.get(i);
- if (caller == null || childCmd != caller)
- childCmd.invertAndPush();
- }
- }
-
- protected void invertFrom(ChildCommand caller) {
- invertAndPush();
- invertChildrenExcept(caller);
- }
-
- protected void pushChildrenForExecute() {
- for (int i = 0; i < getAffectedModels().size(); i++) {
- EditModelRetriever retriever = (EditModelRetriever) getAffectedModels().get(i);
- ChildCommand command = createChildCommand(retriever);
- getChildren().add(command);
- command.executeInModel(command);
- }
- }
-
- public void redo() {
- getTarget().redo();
- invertChildren();
- }
-
- public void redoFrom(ChildCommand child) {
- invertFrom(child);
- }
-
- public void undo() {
- getTarget().undo();
- invertChildren();
- }
-
- public void undoFrom(ChildCommand child) {
- invertFrom(child);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ReadOnlyClientAccessRegistry.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ReadOnlyClientAccessRegistry.java
deleted file mode 100644
index 116e5b060..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ReadOnlyClientAccessRegistry.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-import org.eclipse.jem.internal.util.emf.workbench.nls.EMFWorkbenchResourceHandler;
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchEditResourceHandler;
-
-/**
- * This is a readonly version of the editmodel access registry, only uses a weak hash dictionary,
- * and because the access is read only, is less concerned with timing of access/release, and will be
- * cleaned up on garbage collection if needed.
- *
- */
-public class ReadOnlyClientAccessRegistry extends ClientAccessRegistry {
-
- public ReadOnlyClientAccessRegistry() {
- super();
- }
-
- public synchronized void access(Object accessorKey) {
- if (!registry.containsKey(accessorKey)) {
- this.registry.put(accessorKey, null);
- } else
- throw new ClientAccessRegistryException(EMFWorkbenchEditResourceHandler.ClientAccessRegistry_ERROR_0, accessorKey); //$NON-NLS-1$
- }
-
- public synchronized void release(Object accessorKey) {
-
- /*
- * Error condition: Some one has been naughty and not released the resource
- */
- if (this.registry.containsKey(accessorKey)) {
- this.registry.remove(accessorKey);
- } else
- complain(accessorKey);
- }
-
- public void complain(Object accessorKey) {
-
- throw new ClientAccessRegistryException(EMFWorkbenchResourceHandler.getString("ClientAccessRegistry_ERROR_1"), accessorKey); //$NON-NLS-1$
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/Snapshot.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/Snapshot.java
deleted file mode 100644
index f42201c78..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/Snapshot.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Oct 3, 2003
- *
- */
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchEditResourceHandler;
-
-
-/**
- * The Snapshot is used to remember the call stack trace of any method that accesses a Resource.
- *
- * @author mdelder
- */
-public class Snapshot extends RuntimeException {
-
- public Snapshot() {
- super(EMFWorkbenchEditResourceHandler.Snapshot_ERROR_0); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Throwable#printStackTrace()
- */
- public String getStackTraceString() {
- StringWriter writer = new StringWriter();
- PrintWriter printWriter = new PrintWriter(writer);
- super.printStackTrace(printWriter);
- return writer.toString();
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/WrappingCommandStack.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/WrappingCommandStack.java
deleted file mode 100644
index bf15371b3..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/WrappingCommandStack.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.edit;
-
-
-
-import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.wst.common.internal.emfworkbench.integration.ComposedEditModel;
-
-/**
- * Insert the type's description here. Creation date: (05/21/01 9:31:02 PM)
- *
- * @author: Administrator
- */
-public class WrappingCommandStack extends BasicCommandStack {
- private ComposedEditModel editModel;
-
- /**
- * WrappingCommandStack constructor comment.
- */
- public WrappingCommandStack(ComposedEditModel anEditModel) {
- super();
- editModel = anEditModel;
- }
-
- public void execute(Command command) {
- ParentCommand parent = new ParentCommand(command, editModel);
- super.execute(parent);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/AbstractEditModelCommand.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/AbstractEditModelCommand.java
deleted file mode 100644
index 7061e7d1d..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/AbstractEditModelCommand.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-
-
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.wst.common.internal.emfworkbench.edit.InvertedCommand;
-
-
-public abstract class AbstractEditModelCommand extends AbstractCommand {
- private Command target;
- private AbstractEditModelCommand owner;
-
- protected AbstractEditModelCommand() {
- super();
- }
-
- public AbstractEditModelCommand(Command targetCommand) {
- super();
- target = targetCommand;
- }
-
- public abstract EditModelCommand getEditModelCommand();
-
- protected AbstractEditModelCommand getOutermostCommand() {
- return owner == null ? this : owner.getOutermostCommand();
- }
-
- protected Command getOwner() {
- return owner;
- }
-
- public Command getTarget() {
- return target;
- }
-
- /**
- * Creates a new inverted command on the outermost command
- */
- public InvertedCommand inverted() {
- AbstractEditModelCommand outer = getOutermostCommand();
- InvertedCommand cmd = new InvertedCommand(outer);
- outer.setOwner(cmd);
- return cmd;
- }
-
- protected void setOwner(AbstractEditModelCommand ownerCommand) {
- owner = ownerCommand;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ComposedAccessorKey.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ComposedAccessorKey.java
deleted file mode 100644
index 70cac1e0f..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ComposedAccessorKey.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-
-
-/**
- * @author Administrator
- *
- *
- */
-public class ComposedAccessorKey {
-
- private Object accessorKey = null;
- private Object addonKey = null;
-
-
- public static ComposedAccessorKey getComposedAccessorKey(Object accessorKey, ComposedEditModel editModel) {
- ComposedAccessorKey newKey = new ComposedAccessorKey(accessorKey, editModel);
- editModel.cacheAccessorKey(newKey);
- return newKey;
- }
-
-
- private ComposedAccessorKey(Object accessorKey, Object addonKey) {
- this.accessorKey = accessorKey;
- this.addonKey = addonKey;
- }
-
- public boolean equals(Object other) {
- if (other == null || !(other instanceof ComposedAccessorKey))
- return false;
- ComposedAccessorKey otherKey = (ComposedAccessorKey) other;
-
- return accessorKey.equals(otherKey.accessorKey) && addonKey.equals(otherKey.addonKey);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return accessorKey.hashCode() ^ addonKey.hashCode();
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ComposedEditModel.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ComposedEditModel.java
deleted file mode 100644
index fa92e3db3..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ComposedEditModel.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.wst.common.frameworks.internal.operations.IOperationHandler;
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext;
-import org.eclipse.wst.common.internal.emfworkbench.edit.WrappingCommandStack;
-
-/**
- * Insert the type's description here. Creation date: (05/21/01 8:26:32 PM)
- *
- * @author: Administrator
- */
-public class ComposedEditModel extends EditModel implements EditModelListener {
-
- private List children = null;
- private Map childrenMap = null;
- private List cachedKeys = new ArrayList();
-
- /**
- * ComposedEditModel constructor comment.
- */
- public ComposedEditModel(String editModelID, EMFWorkbenchContext context) {
- super(editModelID, context, false);
- }
-
-
- public void createChildrenIfNecessary(ComposedAccessorKey composedAccessorKey) {
- //do nothing
- }
-
- /**
- * @param newKey
- */
- public void cacheAccessorKey(ComposedAccessorKey newKey) {
- if (!cachedKeys.contains(newKey))
- cachedKeys.add(newKey);
- }
-
- public void dispose() {
- disposing = true;
- if (commandStack != null)
- commandStack.removeCommandStackListener(this);
- if (hasListeners())
- notifyListeners(new EditModelEvent(EditModelEvent.PRE_DISPOSE, this));
- releasePreloadResources();
- releaseIdentifiers();
- emfContext = null;
- listeners = null;
- removedListeners = null;
- resources = null;
- disposing = false;
- project = null;
- cachedKeys = new ArrayList();
- }
-
- public EditModel.Reference addChild(String editModelID, Map params, Object accessorKey) {
- return addChild(editModelID, params, ComposedAccessorKey.getComposedAccessorKey(accessorKey, this));
- }
-
- public EditModel.Reference addChild(String editModelID, Map params, ComposedAccessorKey composedAccessorKey) {
-
- EditModel editModel = getEmfContext().getEditModelForWrite(editModelID, composedAccessorKey, params);
- editModel.addListener(this);
-
- getChildrenMap().put(editModel.getReference(), editModel);
- getChildren().add(editModel);
-
- return editModel.getReference();
- }
-
- public void removeChild(EditModel.Reference reference, Object accessorKey) {
- ComposedAccessorKey composedAccessorKey = ComposedAccessorKey.getComposedAccessorKey(accessorKey, this);
- EditModel editModel = (EditModel) getChildrenMap().remove(reference);
- if (editModel != null) {
- editModel.releaseAccess(composedAccessorKey);
- editModel.removeListener(this);
- getChildren().remove(editModel);
- }
- }
-
- public Iterator getContainedReferences() {
- return getChildrenMap().keySet().iterator();
- }
-
- public EditModel getContainedEditModel(EditModel.Reference reference) {
- return (EditModel) getChildrenMap().get(reference);
- }
-
- /**
- * Return the CommandStack.
- */
- protected BasicCommandStack createCommandStack() {
- return new WrappingCommandStack(this);
- }
-
- /**
- * Forward all events to the listeners for this model
- */
- public void editModelChanged(EditModelEvent anEvent) {
- if (hasListeners())
- notifyListeners(anEvent);
- }
-
- public Set getAffectedFiles() {
- Set aSet = new HashSet();
- List models = getChildren();
- for (int i = 0; i < models.size(); i++) {
- EditModel child = (EditModel) models.get(i);
- aSet.addAll(child.getAffectedFiles());
- }
- return aSet;
- }
-
- public List getChildren() {
- if (children == null)
- children = new ArrayList();
- return children;
- }
-
- protected Map getChildrenMap() {
- if (childrenMap == null)
- childrenMap = new HashMap();
- return childrenMap;
- }
-
- /**
- * Pass along to children.
- */
- protected void handleSaveIfNecessaryDidNotSave(IProgressMonitor monitor) {
- List list = getChildren();
- EditModel editModel;
- for (int i = 0; i < list.size(); i++) {
- editModel = (EditModel) list.get(i);
- editModel.handleSaveIfNecessaryDidNotSave(monitor);
- }
- }
-
- /**
- * Return whether a save is needed on the CommandStack
- */
- public boolean isDirty() {
- Iterator editModels = getChildren().iterator();
- while (editModels.hasNext()) {
- EditModel editModel = (EditModel) editModels.next();
- if (editModel.isDirty())
- return true;
- }
- return false;
- }
-
- public boolean isReadOnly() {
- return false;
- }
-
- /**
- * Return whether a save is needed on the CommandStack
- */
- public boolean isInterrestedInResource(Resource aResource) {
- Iterator editModels = getChildren().iterator();
- while (editModels.hasNext()) {
- EditModel editModel = (EditModel) editModels.next();
- if (editModel.isInterrestedInResource(aResource))
- return true;
- }
- return false;
- }
-
- public void primSave(IProgressMonitor monitor) {
- List list = getChildren();
- for (int i = 0; i < list.size(); i++)
- ((EditModel) list.get(i)).primSave(monitor);
- }
-
- /**
- * This only increments the reference count of the children and should only be called if you
- * know what you are doing.
- */
- public void access(Object accessorKey) {
- ComposedAccessorKey composedAccessorKey = ComposedAccessorKey.getComposedAccessorKey(accessorKey, this);
- if (getChildren().size() == 0) {
- createChildrenIfNecessary(composedAccessorKey);
- } else {
-
- List tempchildren = getChildren();
- for (int i = 0; i < tempchildren.size(); i++) {
- EditModel model = (EditModel) tempchildren.get(i);
- model.access(composedAccessorKey);
- }
- }
- // removing for defect 1978, children should do all the accessing
- super.access(accessorKey);
-
- }
-
- /**
- * This method should be called from each client when they are finished working with the
- * EditModel.
- */
- public void releaseAccess(Object accessorKey) {
- List tempchildren = getChildren();
- ComposedAccessorKey composedAccessorKey = ComposedAccessorKey.getComposedAccessorKey(accessorKey, this);
- for (int i = 0; i < tempchildren.size(); i++) {
- EditModel model = (EditModel) tempchildren.get(i);
- model.releaseAccess(composedAccessorKey);
- }
- removeKeyFromCache(composedAccessorKey);
- // Removing this call... Children should be able to handle all releasing defect 1978
- super.releaseAccess(accessorKey);
- }
-
- public void removeKeyFromCache(ComposedAccessorKey key) {
- cachedKeys.remove(key);
- }
-
- /**
- * If one should save, they all should save.
- */
- protected boolean shouldSave() {
- List list = getChildren();
- EditModel editModel;
- for (int i = 0; i < list.size(); i++) {
- editModel = (EditModel) list.get(i);
- if (editModel.shouldSave())
- return true;
- }
- return false;
- }
-
- /**
- * If one should save, they all should save.
- */
- protected boolean shouldSave(IOperationHandler operationHandler) {
- List list = getChildren();
- EditModel editModel;
- for (int i = 0; i < list.size(); i++) {
- editModel = (EditModel) list.get(i);
- if (editModel.shouldSave(operationHandler))
- return true;
- }
- return false;
- }
-
- /**
- * @see com.ibm.etools.j2ee.workbench.EditModel#getNonResourceFiles()
- */
- public List getNonResourceFiles() {
- List list = getChildren();
- List result = new ArrayList();
- EditModel editModel;
- for (int i = 0; i < list.size(); i++) {
- editModel = (EditModel) list.get(i);
- List files = editModel.getNonResourceFiles();
- if (files != null && !files.isEmpty())
- result.addAll(files);
- }
- return result;
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/CompoundingCommandStack.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/CompoundingCommandStack.java
deleted file mode 100644
index 188a889c5..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/CompoundingCommandStack.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Nov 26, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.command.CommandStackListener;
-
-
-/**
- * @author DABERG
- *
- * This class does not actually execute any commands. It merely gathers the commands to be executed
- * and compounds them so that they can be executed against the actualCommandStack.
- */
-public class CompoundingCommandStack implements CommandStack {
- private CommandStack actualCommandStack;
- private Command compoundCommand;
-
- /**
- *
- */
- public CompoundingCommandStack(CommandStack actualCommandStack) {
- this.actualCommandStack = actualCommandStack;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.CommandStack#execute(org.eclipse.emf.common.command.Command)
- */
- public void execute(Command command) {
- if (compoundCommand == null)
- compoundCommand = command;
- else
- compoundCommand = compoundCommand.chain(command);
- }
-
- public void performExecution() {
- if (compoundCommand != null) {
- try {
- actualCommandStack.execute(compoundCommand);
- } finally {
- compoundCommand = null;
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.CommandStack#canUndo()
- */
- public boolean canUndo() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.CommandStack#undo()
- */
- public void undo() {
- //default
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.CommandStack#canRedo()
- */
- public boolean canRedo() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.CommandStack#getUndoCommand()
- */
- public Command getUndoCommand() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.CommandStack#getRedoCommand()
- */
- public Command getRedoCommand() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.CommandStack#getMostRecentCommand()
- */
- public Command getMostRecentCommand() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.CommandStack#redo()
- */
- public void redo() {
- //redo
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.CommandStack#flush()
- */
- public void flush() {
- //flush
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.CommandStack#addCommandStackListener(org.eclipse.emf.common.command.CommandStackListener)
- */
- public void addCommandStackListener(CommandStackListener listener) {
- //default
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.CommandStack#removeCommandStackListener(org.eclipse.emf.common.command.CommandStackListener)
- */
- public void removeCommandStackListener(CommandStackListener listener) {
- //default
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/DynamicAdapterFactory.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/DynamicAdapterFactory.java
deleted file mode 100644
index 77085d89c..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/DynamicAdapterFactory.java
+++ /dev/null
@@ -1,642 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Dec 1, 2003
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-import org.eclipse.emf.common.notify.impl.NotificationImpl;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.edit.provider.ChangeNotifier;
-import org.eclipse.emf.edit.provider.IChangeNotifier;
-import org.eclipse.emf.edit.provider.IDisposable;
-import org.eclipse.emf.edit.provider.INotifyChangedListener;
-import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.frameworks.internal.enablement.EnablementIdentifier;
-import org.eclipse.wst.common.frameworks.internal.enablement.EnablementIdentifierEvent;
-import org.eclipse.wst.common.frameworks.internal.enablement.EnablementManager;
-import org.eclipse.wst.common.frameworks.internal.enablement.IEnablementIdentifier;
-import org.eclipse.wst.common.frameworks.internal.enablement.IEnablementIdentifierListener;
-import org.eclipse.wst.common.frameworks.internal.enablement.IEnablementManager;
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchEditResourceHandler;
-import org.eclipse.wst.common.internal.emfworkbench.edit.AdapterFactoryDescriptor;
-import org.eclipse.wst.common.internal.emfworkbench.edit.AdapterFactoryRegistry;
-import org.eclipse.wst.common.internal.emfworkbench.edit.ExtendedComposedAdapterFactory;
-
-/**
- * @author schacher
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class DynamicAdapterFactory implements AdapterFactory, IChangeNotifier, IDisposable, INotifyChangedListener, IEnablementIdentifierListener {
-
- private static final AdapterFactory NULL_FACTORY = new AdapterFactoryImpl();
-
- private ResourceItemProviderAdapterFactory resourceItemProviderAdapterFactory = null;
-
- private String viewID;
-
- //Each of the two maps below are keyed by the project
- private Map adapterFactoriesByPackage;
-
- private Map adapterFactoriesByType;
-
- private Set allFactories;
-
- /**
- * This is used to implement {@link IChangeNotifier}
- */
- protected ChangeNotifier changeNotifier = new ChangeNotifier();
-
- private boolean respectingActivities = false;
-
- protected static final Object NO_PROJECT = "NO_PROJECT"; //$NON-NLS-1$
-
- /**
- */
- public DynamicAdapterFactory(String viewID, boolean respectActivies) {
- this.viewID = viewID;
- this.respectingActivities = respectActivies;
- initialize();
- }
-
- /**
- */
- public DynamicAdapterFactory(String viewID) {
- this.viewID = viewID;
- initialize();
- }
-
- private void initialize() {
- adapterFactoriesByPackage = new HashMap();
- adapterFactoriesByType = new HashMap();
- allFactories = new HashSet();
- }
-
- public boolean isFactoryForType(Object type) {
- return getFactoryForType(type) != null;
- }
-
- private AdapterFactory getFactoryForType(Object type) {
-
- if (type == null)
- return null;
-
- if (type instanceof EObject)
- return getFactoryForType((EObject) type);
-
- Object aProject = ProjectUtilities.getProject(type);
- if (aProject == null)
- aProject = NO_PROJECT;
- AdapterFactory factory = getExistingFactoryForType(aProject, type);
- if (factory == NULL_FACTORY)
- return null;
- else if (factory == null) {
- factory = findFactoryForType(aProject, type);
-
- if (factory == null)
- addAdapterFactory(aProject, type, NULL_FACTORY);
- else
- addAdapterFactory(aProject, type, factory);
- }
- return factory;
- }
-
- private AdapterFactory getExistingFactoryForType(Object p, Object type) {
- if (p == null)
- return null;
- Map aMap = (Map) adapterFactoriesByType.get(p);
- if (aMap == null)
- return null;
- return (AdapterFactory) adapterFactoriesByType.get(type);
- }
-
- /*
- * The factory was not cached by type, so we will search the cache of factories for the project
- * and see if it can be found there
- */
- private AdapterFactory findFactoryForType(Object project, Object type) {
- if (project == null)
- return null;
- Map aMap = (Map) adapterFactoriesByPackage.get(project);
- if (aMap == null)
- return null;
- Iterator iter = aMap.values().iterator();
- AdapterFactory factory = null;
- while (iter.hasNext()) {
- factory = (AdapterFactory) iter.next();
- if (factory.isFactoryForType(type))
- return factory;
- }
-
- // adapt the resource to its contents
- if (getResourceItemProviderAdapterFactory().isFactoryForType(type))
- return getResourceItemProviderAdapterFactory();
- return null;
- }
-
- private AdapterFactory getFactoryForType(EObject obj) {
- EClass eClass = obj.eClass();
- if (eClass == null)
- return null;
-
- EPackage ePackage = eClass.getEPackage();
- Object aProject = ProjectUtilities.getProject(obj);
- if (aProject == null)
- aProject = NO_PROJECT;
- AdapterFactory result = getFactoryForPackage(aProject, ePackage);
-
- if (result == null) {
- Set failedPackageSet = new HashSet();
- failedPackageSet.add(ePackage);
- Iterator supertypes = eClass.getEAllSuperTypes().iterator();
- while (supertypes.hasNext()) {
- eClass = (EClass) supertypes.next();
- if (eClass != null) {
- ePackage = eClass.getEPackage();
- if (failedPackageSet.add(ePackage)) {
- result = getFactoryForPackage(aProject, ePackage);
- if (result != null)
- break;
- }
- }
- }
- }
- return result;
- }
-
- private AdapterFactory getFactoryForPackage(Object aProject, EPackage aPackage) {
- if (aProject == null || aPackage == null)
- return null;
- AdapterFactory factory = getExistingFactoryForPackage(aProject, aPackage);
- if (factory == NULL_FACTORY)
- return null;
- else if (factory == null) {
- try {
- factory = createAdapterFactory(aProject, aPackage);
-
- if (factory == null)
- addAdapterFactory(aProject, aPackage, NULL_FACTORY);
- else
- addAdapterFactory(aProject, aPackage, factory);
- } catch (RuntimeException re) {
- Logger.getLogger().logError(re);
- }
- }
- return factory;
- }
-
- private AdapterFactory getFactoryForTypes(Object p, List types) {
- Map aMap = (Map) adapterFactoriesByPackage.get(p);
- if (aMap == null)
- return adaptResourceTypes(types);
-
- Iterator factories = aMap.values().iterator();
- AdapterFactory factory = null;
- while (factories.hasNext()) {
- factory = (AdapterFactory) factories.next();
- if (isFactoryForAllTypes(factory, types)) {
- return factory;
- }
- }
-
-
- return null;
- }
-
- private AdapterFactory adaptResourceTypes(List types) {
- // adapt the resource to its contents
- if (isFactoryForAllTypes(getResourceItemProviderAdapterFactory(), types))
- return getResourceItemProviderAdapterFactory();
- return null;
- }
-
- private void removeFactoryForTypes(Object p, List types) {
- Map aMap = (Map) adapterFactoriesByPackage.get(p);
- if (aMap == null)
- return;
- Iterator factories = aMap.values().iterator();
- AdapterFactory factory = null;
- while (factories.hasNext()) {
- factory = (AdapterFactory) factories.next();
- if (isFactoryForAllTypes(factory, types)) {
- aMap.remove(factory);
- }
- }
-
- }
-
- private boolean isFactoryForAllTypes(AdapterFactory factory, List types) {
- for (int i = 0; i < types.size(); i++) {
- if (!factory.isFactoryForType(types.get(i))) {
- return false;
- }
- }
- return true;
-
- }
-
- private AdapterFactory getExistingFactoryForPackage(Object p, EPackage aPackage) {
- if (p == null)
- return null;
- Map aMap = (Map) adapterFactoriesByPackage.get(p);
- if (aMap == null)
- return null;
- return (AdapterFactory) aMap.get(aPackage);
- }
-
- private void addAdapterFactory(Object p, EPackage aPackage, AdapterFactory adapterFactory) {
- Map aMap = getOrCreateMap(p, adapterFactoriesByPackage);
-
- aMap.put(aPackage, adapterFactory);
-
- if (adapterFactory == NULL_FACTORY)
- return;
-
- if (adapterFactory instanceof IChangeNotifier) {
- ((IChangeNotifier) adapterFactory).addListener(this);
- }
- allFactories.add(adapterFactory);
- }
-
- private Map getOrCreateMap(Object p, Map container) {
- Map aMap = (Map) container.get(p);
- if (aMap == null) {
- aMap = new HashMap(10);
- container.put(p, aMap);
- }
- return aMap;
- }
-
- private void addAdapterFactory(Object p, Object type, AdapterFactory adapterFactory) {
- Map aMap = getOrCreateMap(p, adapterFactoriesByType);
- aMap.put(type, adapterFactory);
-
- if (adapterFactory == NULL_FACTORY)
- return;
-
- if (adapterFactory instanceof IChangeNotifier) {
- ((IChangeNotifier) adapterFactory).addListener(this);
- }
- allFactories.add(adapterFactory);
- }
-
- public Object adapt(Object target, Object type) {
- Object adapter = target;
- if (target instanceof Notifier) {
- adapter = adapt((Notifier) target, type);
- }
-
- if (!(type instanceof Class) || (((Class) type).isInstance(adapter))) {
- return adapter;
- }
-
- return null;
- }
-
- public Adapter adapt(Notifier target, Object type) {
- Adapter result = null;
-
- if (target instanceof EObject)
- result = adapt((EObject) target, type);
- else {
- Object p = ProjectUtilities.getProject(target);
- if (p == null)
- p = NO_PROJECT;
- result = adapt(p, target, type, new HashSet(), target.getClass());
-
- }
-
- return result;
- }
-
- public Adapter adapt(EObject target, Object type) {
-
- EClass eClass = target.eClass();
- if (eClass == null)
- return null;
-
- EPackage ePackage = eClass.getEPackage();
- Adapter result = adapt(target, ePackage, type);
-
- if (result == null) {
- Set failedPackageSet = new HashSet();
- failedPackageSet.add(ePackage);
- Iterator supertypes = eClass.getEAllSuperTypes().iterator();
- while (supertypes.hasNext()) {
- eClass = (EClass) supertypes.next();
- if (eClass != null) {
- ePackage = eClass.getEPackage();
- if (failedPackageSet.add(ePackage)) {
- result = adapt(target, ePackage, type);
- if (result != null)
- break;
- }
- }
- }
- }
- return result;
- }
-
- private Adapter adapt(EObject target, EPackage ePackage, Object type) {
- Object aProject = ProjectUtilities.getProject(target);
- if (aProject == null)
- aProject = NO_PROJECT;
- AdapterFactory delegate = getFactoryForPackage(aProject, ePackage);
- if (delegate != null && delegate.isFactoryForType(type)) {
- return delegate.adapt(target, type);
- }
-
- return null;
- }
-
- /*
- * Code borrowed from {@link ComposedAdapterFactory}
- *
- */
- private Adapter adapt(Object p, Notifier target, Object type, Collection failedPackages, Class javaClass) {
- if (p == null)
- return null;
-
- Adapter result = null;
-
- Package javaPackage = javaClass.getPackage();
- if (failedPackages.add(javaPackage)) {
- List types = new ArrayList(2);
- types.add(javaPackage);
- if (type != null) {
- types.add(type);
- }
-
- /* when an error occurs, remove the delegate and try again */
- boolean attemptAdaptAgain = true;
- while (result == null && attemptAdaptAgain) {
- attemptAdaptAgain = false;
-
- AdapterFactory delegateAdapterFactory = getFactoryForTypes(p, types);
- if (delegateAdapterFactory != null) {
- try {
- result = delegateAdapterFactory.adapt(target, type);
- } catch (RuntimeException re) {
- Logger.getLogger().logError(re);
- removeFactoryForTypes(p, types);
- attemptAdaptAgain = true;
- }
- }
- }
- }
-
- if (result == null) {
- Class superclass = javaClass.getSuperclass();
- if (superclass != null) {
- result = adapt(p, target, type, failedPackages, javaClass.getSuperclass());
- }
- if (result == null) {
- Class[] interfaces = javaClass.getInterfaces();
- for (int i = 0; i < interfaces.length; ++i) {
- result = adapt(p, target, type, failedPackages, interfaces[i]);
- if (result != null) {
- break;
- }
- }
- }
- }
-
- return result;
- }
-
- public Adapter adaptNew(Notifier target, Object type) {
-
- AdapterFactory factory = getFactoryForType(target);
-
- if (factory != null)
- return factory.adaptNew(target, type);
- return null;
- }
-
- public void adaptAllNew(Notifier target) {
-
- AdapterFactory factory = getFactoryForType(target);
-
- if (factory != null)
- factory.adaptAllNew(target);
-
- }
-
- public void addListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.add(notifyChangedListener);
- }
-
- public void removeListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.remove(notifyChangedListener);
- }
-
- public void fireNotifyChanged(Notification notification) {
- if (changeNotifier == null || changeNotifier.isEmpty() || changeNotifier.get(0) == null)
- return;
- changeNotifier.fireNotifyChanged(notification);
- }
-
- public void dispose() {
- Iterator iter = allFactories.iterator();
- Object factory = null;
- while (iter.hasNext()) {
- factory = iter.next();
- disposeFactory(factory);
- }
- for (Iterator itr = getEnablementIdentifiers().iterator(); itr.hasNext();) {
- ((IEnablementIdentifier) itr.next()).removeIdentifierListener(this);
- }
- if (resourceItemProviderAdapterFactory != null)
- resourceItemProviderAdapterFactory.removeListener(this);
- }
-
- private void disposeFactory(Object factory) {
- if (factory instanceof IDisposable) {
- ((IDisposable) factory).dispose();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.INotifyChangedListener#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- public void notifyChanged(Notification notification) {
- //Foward the notification on to all my listeners
- fireNotifyChanged(notification);
- }
-
- /**
- * @param project
- */
- private void removeAdapterFactories(Object project) {
- adapterFactoriesByType.remove(project);
- Map aMap = (Map) adapterFactoriesByPackage.remove(project);
- if (aMap == null)
- return;
-
- Iterator factories = aMap.values().iterator();
- Object adapterFactory;
- while (factories.hasNext()) {
- adapterFactory = factories.next();
- allFactories.remove(adapterFactory);
- disposeFactory(adapterFactory);
- }
- }
-
- private AdapterFactory createAdapterFactory(Object project, EPackage ePackage) {
- if (ePackage == null)
- throw new IllegalArgumentException(EMFWorkbenchEditResourceHandler.DynamicAdapterFactory_ERROR_0); //$NON-NLS-1$
-
- return createAdapterFactory(project, AdapterFactoryRegistry.instance().getDescriptors(ePackage, viewID));
-
- }
-
- private AdapterFactory createAdapterFactory(Object project, List descriptors) {
- if (descriptors == null || descriptors.isEmpty())
- return null;
-
- AdapterFactory fact = null;
- IEnablementIdentifier identifier = null;
- AdapterFactoryDescriptor desc = null;
- if (descriptors.size() == 1) {
- desc = (AdapterFactoryDescriptor) descriptors.get(0);
- identifier = getIdentifier(project, desc);
- addListenerIfNecessary(identifier);
- if (project.equals(NO_PROJECT) || (identifier != null && identifier.isEnabled()))
- return desc.createInstance();
- return null;
- }
- List factories = new ArrayList(descriptors.size());
- for (int i = 0; i < descriptors.size(); i++) {
- desc = (AdapterFactoryDescriptor) descriptors.get(i);
- identifier = getIdentifier(project, desc);
- addListenerIfNecessary(identifier);
- if (project.equals(NO_PROJECT) || (identifier != null && identifier.isEnabled())) {
- fact = desc.createInstance();
- if (fact != null)
- factories.add(fact);
- }
- }
- if (factories.isEmpty())
- return null;
-
- return new ExtendedComposedAdapterFactory(factories);
- }
-
- /**
- * @param project
- * @param desc
- * @return
- */
- private IEnablementIdentifier getIdentifier(Object project, AdapterFactoryDescriptor desc) {
- IEnablementIdentifier identifier = null;
- if (isRespectingActivities() && project instanceof IProject)
- identifier = IEnablementManager.INSTANCE.getIdentifier(desc.getID(), (IProject) project);
- else if (project instanceof IProject)
- identifier = EnablementManager.INSTANCE.getIdentifier(desc.getID(), (IProject) project);
- return identifier;
- }
-
- /**
- * @return
- */
- private boolean isRespectingActivities() {
- return respectingActivities;
- }
-
- protected void addListenerIfNecessary(IEnablementIdentifier identifier) {
- if (identifier == null)
- return;
- identifier.addIdentifierListener(this);
- getEnablementIdentifiers().add(identifier);
- }
-
- protected boolean isListeningTo(IEnablementIdentifier identifier) {
- return getEnablementIdentifiers().contains(identifier);
- }
-
- /**
- * @return Returns the enablementIdentifiers.
- */
- protected Set getEnablementIdentifiers() {
- if (enablementIdentifiers == null)
- enablementIdentifiers = new HashSet();
- return enablementIdentifiers;
- }
-
- private Set enablementIdentifiers;
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.enablement.IEnablementIdentifierListener#identifierChanged(org.eclipse.wst.common.frameworks.internal.enablement.EnablementIdentifierEvent)
- */
- public void identifierChanged(EnablementIdentifierEvent identifierEvent) {
- if (identifierEvent.hasEnabledChanged() || identifierEvent.hasFunctionGroupIdsChanged()) {
- Object project = ((EnablementIdentifier) identifierEvent.getIdentifier()).getProject();
- if (project != null) {
- removeAdapterFactories(project);
- /*
- * final Notifier notifier = (Notifier) getCachedRoots().get(project);
- */
- /* force a viewer refresh */
- notifyChanged(new NotificationImpl(Notification.ADD, null, null) {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.notify.impl.NotificationImpl#getNotifier()
- */
- public Object getNotifier() {
- return null; // notifier;
- }
- });
- }
- /* else replace entire structure */
- }
- }
-
- /**
- * @return Returns the resourceItemProviderAdapterFactory.
- */
- public ResourceItemProviderAdapterFactory getResourceItemProviderAdapterFactory() {
- if (resourceItemProviderAdapterFactory == null) {
- resourceItemProviderAdapterFactory = new ResourceItemProviderAdapterFactory();
- resourceItemProviderAdapterFactory.addListener(this);
- }
- return resourceItemProviderAdapterFactory;
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EMFWorkbenchEditPlugin.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EMFWorkbenchEditPlugin.java
deleted file mode 100644
index e32854b52..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EMFWorkbenchEditPlugin.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-import java.io.FileNotFoundException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
-import org.eclipse.wst.common.internal.emfworkbench.EMFAdapterFactory;
-import org.eclipse.wst.common.internal.emfworkbench.PassthruResourceSet;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class EMFWorkbenchEditPlugin extends Plugin {
- public static final String ID = "org.eclipse.wst.common.emfworkbench.integration"; //$NON-NLS-1$
-
- public static final String EDIT_MODEL_FACTORIES_EXTENSION_POINT = "editModel"; //$NON-NLS-1$
- public static final String EDIT_MODEL_EXTENSION_REGISTRY_EXTENSION_POINT = "editModelExtension"; //$NON-NLS-1$
- public static final String ADAPTER_FACTORY_REGISTRY_EXTENSION_POINT = "adapterFactory"; //$NON-NLS-1$
-
-
- //The shared instance.
- private static EMFWorkbenchEditPlugin plugin;
-
- /**
- * The constructor.
- */
- public EMFWorkbenchEditPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared instance.
- */
- public static EMFWorkbenchEditPlugin getDefault() {
- return plugin;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugin#startup()
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- ExtendedEcoreUtil.setFileNotFoundDetector(new ExtendedEcoreUtil.FileNotFoundDetector() {
- public boolean isFileNotFound(WrappedException wrappedEx) {
- return WorkbenchResourceHelperBase.isResourceNotFound(wrappedEx) || wrappedEx.exception() instanceof FileNotFoundException;
- }
- });
- WorkbenchResourceHelper.initializeFileAdapterFactory();
-
- IAdapterManager manager = Platform.getAdapterManager();
- manager.registerAdapters(new EMFAdapterFactory(), EObject.class);
- }
-
- public static ResourceSet createIsolatedResourceSet(IProject project) {
- return new PassthruResourceSet(project);
- }
-
- public static ResourceSet createWorkspacePassthruResourceSet() {
- return new PassthruResourceSet();
- }
-
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModel.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModel.java
deleted file mode 100644
index f83ee8507..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModel.java
+++ /dev/null
@@ -1,1586 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.command.CommandStackListener;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.jem.internal.util.emf.workbench.nls.EMFWorkbenchResourceHandler;
-import org.eclipse.jem.util.emf.workbench.ResourceSetWorkbenchSynchronizer;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-import org.eclipse.wst.common.frameworks.internal.ISaveHandler;
-import org.eclipse.wst.common.frameworks.internal.SaveFailedException;
-import org.eclipse.wst.common.frameworks.internal.SaveHandlerHeadless;
-import org.eclipse.wst.common.frameworks.internal.SaveHandlerRegister;
-import org.eclipse.wst.common.frameworks.internal.enablement.EnablementIdentifierEvent;
-import org.eclipse.wst.common.frameworks.internal.enablement.IEnablementIdentifier;
-import org.eclipse.wst.common.frameworks.internal.enablement.IEnablementIdentifierListener;
-import org.eclipse.wst.common.frameworks.internal.enablement.nonui.IWFTWrappedException;
-import org.eclipse.wst.common.frameworks.internal.operations.IOperationHandler;
-import org.eclipse.wst.common.internal.emf.resource.CompatibilityXMIResource;
-import org.eclipse.wst.common.internal.emf.resource.ReferencedResource;
-import org.eclipse.wst.common.internal.emf.resource.TranslatorResource;
-import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
-import org.eclipse.wst.common.internal.emf.utilities.PleaseMigrateYourCodeError;
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-import org.eclipse.wst.common.internal.emfworkbench.edit.ClientAccessRegistry;
-import org.eclipse.wst.common.internal.emfworkbench.edit.EditModelRegistry;
-import org.eclipse.wst.common.internal.emfworkbench.edit.EditModelResource;
-import org.eclipse.wst.common.internal.emfworkbench.edit.ReadOnlyClientAccessRegistry;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateInputProvider;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorImpl;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorPresenter;
-
-
-public class EditModel implements CommandStackListener, ResourceStateInputProvider, ResourceStateValidator, IEnablementIdentifierListener {
-
- protected BasicCommandStack commandStack;
- protected List listeners;
- protected List removedListeners = new ArrayList();
- private Map params;
- private final String editModelID;
- private final boolean readOnly;
- // These are the current resource uris we need to track
- protected List knownResourceUris;
- // This is a subset of the known resource uris, which we have requested be autoloaded
- protected List preloadResourceUris;
- // This is a map of identifiers to resources that we need to listen to in order to listen for
- // updates to the edit model resources
- protected Map resourceIdentifiers;
-
- protected EditModelEvent dirtyModelEvent;
- protected boolean isNotifing = false;
- protected boolean disposing = false;
- private boolean disposed = false;
- protected ResourceStateValidator stateValidator;
- protected boolean accessAsReadForUnKnownURIs;
- protected ResourceAdapter resourceAdapter = new ResourceAdapter();
- protected boolean isReverting = false;
- protected List resources;
- private ClientAccessRegistry registry;
- protected EMFWorkbenchContext emfContext = null;
- protected IProject project = null;
-
- private Reference reference;
- private List resourcesTargetedForTermination;
-
- protected class ResourceAdapter extends AdapterImpl {
- public void notifyChanged(Notification notification) {
- if (notification.getEventType() == Notification.SET && notification.getFeatureID(null) == Resource.RESOURCE__IS_LOADED) {
- resourceIsLoadedChanged((Resource) notification.getNotifier(), notification.getOldBooleanValue(), notification.getNewBooleanValue());
- }
- }
- }
-
- public EditModel(String editModelID, EMFWorkbenchContext context, boolean readOnly) {
- if (context == null)
- throw new IllegalStateException("EMF context can't be null"); //$NON-NLS-1$
- this.editModelID = editModelID;
- this.readOnly = readOnly;
- if (readOnly)
- this.registry = new ReadOnlyClientAccessRegistry();
- else
- this.registry = new ClientAccessRegistry();
- this.emfContext = context;
- this.project = context.getProject();
- initializeKnownResourceUris();
- processLoadedResources();
- processPreloadResources();
- }
-
-
-// private ClientAccessRegistry initializeRegistry(Object read) {
-//
-// return null;
-// }
-
-
- public EditModel(String editModelID, EMFWorkbenchContext context, boolean readOnly, boolean accessUnknownResourcesAsReadOnly) {
- this(editModelID, context, readOnly);
- this.accessAsReadForUnKnownURIs = accessUnknownResourcesAsReadOnly;
- }
-
- /**
- * @return editModelID
- */
- public String getEditModelID() {
- return editModelID;
- }
-
- /**
- * Insert the method's description here. Creation date: (9/27/2001 10:25:43 PM)
- *
- * @return boolean
- */
- public boolean isDisposing() {
- return disposing;
- }
-
- public void dispose() {
- synchronized (this) {
- if (disposing || isDisposed())
- return;
- disposing = true;
- }
- try {
- releaseResources();
-
- if (commandStack != null)
- commandStack.removeCommandStackListener(this);
- if (hasListeners())
- notifyListeners(new EditModelEvent(EditModelEvent.PRE_DISPOSE, this));
- if (getEmfContext() != null)
- getEmfContext().removeEditModel(this, isReadOnly());
- releasePreloadResources();
- releaseIdentifiers();
-
- emfContext = null;
- listeners = null;
- removedListeners = null;
- resources = null;
- project = null;
- } catch (RuntimeException re) {
- re.printStackTrace();
- } finally {
- disposed = true;
- disposing = false;
- }
- }
-
- protected void releaseIdentifiers() {
- if (resourceIdentifiers == null)
- return;
- Iterator iter = resourceIdentifiers.keySet().iterator();
- IEnablementIdentifier identifier = null;
- while (iter.hasNext()) {
- identifier = (IEnablementIdentifier) iter.next();
- identifier.removeIdentifierListener(this);
- }
- }
-
- private ResourceSetWorkbenchSynchronizer getResourceSetSynchronizer() {
- if (emfContext == null || !emfContext.hasResourceSet())
- return null;
- return getEmfContext().getResourceSet().getSynchronizer();
- }
-
- protected void releasePreloadResources() {
- ResourceSetWorkbenchEditSynchronizer sync = (ResourceSetWorkbenchEditSynchronizer) getResourceSetSynchronizer();
- if (sync != null) {
- for (int i = 0; i < preloadResourceUris.size(); i++) {
- URI uri = (URI) preloadResourceUris.get(i);
- sync.disableAutoload(uri);
- }
- }
- }
-
-
- /** ** BEGIN Command Stack Manipulation *** */
-
- /**
- * Return the CommandStack.
- */
- protected BasicCommandStack createCommandStack() {
- BasicCommandStack stack = new BasicCommandStack();
- return stack;
- }
-
- /**
- * This is called with the {@link CommandStack}'s state has changed.
- */
- public void commandStackChanged(java.util.EventObject event) {
- if (dirtyModelEvent == null)
- dirtyModelEvent = new EditModelEvent(EditModelEvent.DIRTY, this);
- if (hasListeners())
- notifyListeners(dirtyModelEvent);
- }
-
- /**
- * Flush the Commands from the CommandStack.
- */
- protected void flushCommandStack() {
- getCommandStack().flush();
- getCommandStack().saveIsDone();
- }
-
- /**
- * Return the CommandStack.
- */
- public BasicCommandStack getCommandStack() {
- if (commandStack == null) {
- commandStack = createCommandStack();
- commandStack.addCommandStackListener(this);
- }
- return commandStack;
- }
-
- /**
- * Returns true if there are any listeners
- */
- public boolean hasListeners() {
- return !getListeners().isEmpty();
- }
-
- /** ** END Command Stack Manipulation *** */
-
- /** ** BEGIN Listeners *** */
-
- /**
- * Add
- *
- * @aListener to the list of listeners.
- */
- public void addListener(EditModelListener aListener) {
- if (aListener != null && !getListeners().contains(aListener))
- getListeners().add(aListener);
- }
-
- /**
- * Insert the method's description here. Creation date: (4/11/2001 4:42:58 PM)
- *
- * @return java.util.List
- */
- protected java.util.List getListeners() {
- if (listeners == null)
- listeners = new ArrayList();
- return listeners;
- }
-
- /**
- * Notify listeners of
- *
- * @anEvent.
- */
- protected void notifyListeners(EditModelEvent anEvent) {
- if (listeners == null)
- return;
- boolean oldIsNotifying = isNotifing;
- synchronized (this) {
- isNotifing = true;
- }
- try {
- List list = getListeners();
- for (int i = 0; i < list.size(); i++) {
- EditModelListener listener = (EditModelListener) list.get(i);
- if (!removedListeners.contains(listener))
- listener.editModelChanged(anEvent);
- }
- } finally {
- synchronized (this) {
- isNotifing = oldIsNotifying;
- if (!isNotifing && removedListeners != null && !removedListeners.isEmpty()) {
- listeners.removeAll(removedListeners);
- removedListeners.clear();
- }
- }
- }
- }
-
- /**
- * Remove
- *
- * @aListener from the list of listeners.
- */
- public synchronized boolean removeListener(EditModelListener aListener) {
- if (aListener != null) {
- if (isNotifing)
- return removedListeners.add(aListener);
- return getListeners().remove(aListener);
- }
- return false;
- }
-
- /** ** END Listeners *** */
-
- protected void makeFileEditable(IFile aFile) {
- if (aFile == null)
- return;
- aFile.getResourceAttributes().setReadOnly(false);
- }
-
- /**
- * @return java.util.List of IFile; any read-only files that will be touched if this edit model
- * saves
- */
- public List getReadOnlyAffectedFiles() {
- Iterator affected = getAffectedFiles().iterator();
- List result = new ArrayList();
- while (affected.hasNext()) {
- IFile aFile = (IFile) affected.next();
- if (aFile.isReadOnly())
- result.add(aFile);
- }
- return result;
- }
-
- /** ** BEGIN Save Handlers *** */
-
- protected ISaveHandler getSaveHandler() {
- return SaveHandlerRegister.getSaveHandler();
- }
-
- /**
- * Default is to do nothing. This method is called if a saveIfNecessary or
- * saveIfNecessaryWithPrompt determines not to save. This provides subclasses with an
- * opportunity to do some other action.
- */
- protected void handleSaveIfNecessaryDidNotSave(IProgressMonitor monitor) {
- // do nothing
- }
-
- /**
- * This will force all of the referenced Resources to be saved.
- */
- public void save(Object accessorKey) {
- save(null, accessorKey);
- }
-
- /**
- * This will force all of the referenced Resources to be saved.
- */
- public void save(IProgressMonitor monitor) throws PleaseMigrateYourCodeError {
- // save
- }
-
- /**
- * Subclasses may override {@link #primSave}
- */
- public final void save(IProgressMonitor monitor, Object accessorKey) {
- assertPermissionToSave(accessorKey);
- getSaveHandler().access();
- try {
- IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
- public void run(IProgressMonitor aMonitor) {
- primSave(aMonitor);
- }
- };
- runSaveOperation(runnable, monitor);
- } catch (SaveFailedException ex) {
- getSaveHandler().handleSaveFailed(ex, monitor);
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- finally {
- getSaveHandler().release();
- }
- }
-
- /**
- * Save only resources that need to be saved (i.e., no other references).
- */
- public void saveIfNecessary(Object accessorKey) {
- saveIfNecessary(null, accessorKey);
- }
-
- /**
- * Save only resources that need to be saved (i.e., no other references).
- */
- public void saveIfNecessary(IProgressMonitor monitor, Object accessorKey) {
- if (shouldSave())
- save(monitor, accessorKey);
- else
- handleSaveIfNecessaryDidNotSave(monitor);
- }
-
- /**
- * Save only if necessary. If typically a save would not occur because this edit model is
- * shared, the user will be prompted using the
- *
- * @operationHandler. If the prompt returns true (the user wants to save) the entire edit model
- * will be saved.
- */
- public void saveIfNecessaryWithPrompt(IOperationHandler operationHandler, Object accessorKey) {
- saveIfNecessaryWithPrompt(null, operationHandler, accessorKey);
- }
-
- /**
- * Save only if necessary. If typically a save would not occur because this edit model is
- * shared, the user will be prompted using the
- *
- * @operationHandler. If the prompt returns true (the user wants to save) the entire edit model
- * will be saved. You may pass in a boolean <code>wasDirty</code> to
- * indicate whether this edit model was dirty prior to making any changes and
- * calling this method. {@link EditModel#isDirty()}
- */
- public void saveIfNecessaryWithPrompt(IOperationHandler operationHandler, boolean wasDirty, Object accessorKey) {
- saveIfNecessaryWithPrompt(null, operationHandler, wasDirty, accessorKey);
- }
-
- /**
- * Save only if necessary. If typically a save would not occur because this edit model is
- * shared, the user will be prompted using the
- *
- * @operationHandler. If the prompt returns true (the user wants to save) the entire edit model
- * will be saved.
- */
- public void saveIfNecessaryWithPrompt(IProgressMonitor monitor, IOperationHandler operationHandler, Object accessorKey) {
- saveIfNecessaryWithPrompt(monitor, operationHandler, true, accessorKey);
- }
-
- /**
- * Save only if necessary. If typically a save would not occur because this edit model is
- * shared, the user will be prompted using the
- *
- * @operationHandler. If the prompt returns true (the user wants to save) the entire edit model
- * will be saved. You may pass in a boolean <code>wasDirty</code> to
- * indicate whether this edit model was dirty prior to making any changes and
- * calling this method. {@link EditModel#isDirty()}
- */
- public void saveIfNecessaryWithPrompt(IProgressMonitor monitor, IOperationHandler operationHandler, boolean wasDirty, Object accessorKey) {
-
- if (shouldSave(operationHandler, wasDirty))
- save(monitor, accessorKey);
- else
- handleSaveIfNecessaryDidNotSave(monitor);
- }
-
- protected void assertPermissionToSave(Object accessorKey) {
- if (registry != null)
- registry.assertAccess(accessorKey);
- }
-
- protected void runSaveOperation(IWorkspaceRunnable runnable, IProgressMonitor monitor) throws SaveFailedException {
- try {
- ResourcesPlugin.getWorkspace().run(runnable, getProject(),IWorkspace.AVOID_UPDATE,monitor);
- } catch (CoreException e) {
- throw new SaveFailedException(e);
- }
- }
-
- /**
- * Should the resources be saved.
- */
- protected boolean shouldSave(IOperationHandler operationHandler, boolean wasDirty) {
- return !wasDirty ? shouldSave() : shouldSave(operationHandler);
- }
-
- /**
- * Return true if the uri for
- *
- * @aResource is one of the known resource uris.
- */
- public boolean isInterrestedInResource(Resource aResource) {
- return isInterrestedInResourceUri(aResource.getURI());
- }
-
- protected boolean isInterrestedInResourceUri(URI resURI) {
- URI uri;
- List uriStrings = getKnownResourceUris();
- for (int i = 0; i < uriStrings.size(); i++) {
- uri = (URI) uriStrings.get(i);
- if (ExtendedEcoreUtil.endsWith(resURI, uri))
- return true;
- }
- return false;
- }
-
-
- /**
- * Subclasses should override and add URIs (type URI) of known resources. You must add resources
- * that have references to other known resources first so they will be released first.
- */
- protected void initializeKnownResourceUris() {
- knownResourceUris = new ArrayList();
- preloadResourceUris = new ArrayList();
- EditModelResource res = null;
- Collection editModelResources = EditModelRegistry.getInstance().getEditModelResources(getEditModelID());
- Iterator iter = editModelResources.iterator();
- while (iter.hasNext()) {
- res = (EditModelResource) iter.next();
- addEditModelResource(res);
- }
-
- }
-
- private void addEditModelResource(EditModelResource res) {
- boolean enabled = false;
- if (res.isCore()) {
- enabled = true;
- } else {
- IEnablementIdentifier identifier = res.getEnablementIdentifier(getProject());
- registerInterest(identifier, res);
- enabled = identifier.isEnabled();
- }
- if (enabled) {
- URI uri = res.getURI();
- knownResourceUris.add(uri);
- if (res.isAutoLoad()) {
- ResourceSetWorkbenchEditSynchronizer sync = (ResourceSetWorkbenchEditSynchronizer) getEmfContext().getResourceSet().getSynchronizer();
- sync.enableAutoload(uri);
- preloadResourceUris.add(uri);
- }
- }
- }
-
- /**
- * @param res
- */
- private void registerInterest(IEnablementIdentifier identifier, EditModelResource res) {
- getEditModelResources(identifier).add(res);
- }
-
- private List getEditModelResources(IEnablementIdentifier identifier) {
- if (resourceIdentifiers == null)
- resourceIdentifiers = new HashMap();
- List tResources = (List) resourceIdentifiers.get(identifier);
- if (tResources == null) {
- tResources = new ArrayList(3);
- resourceIdentifiers.put(identifier, tResources);
- identifier.addIdentifierListener(this);
- }
- return tResources;
- }
-
-
-
- public java.util.List getKnownResourceUris() {
- if (knownResourceUris == null)
- initializeKnownResourceUris();
-
- return knownResourceUris;
- }
-
- public boolean isShared() {
- return registry.size() > 1;
- }
-
- /**
- * @see ResourceStateInputProvider#cacheNonResourceValidateState(List)
- */
- public void cacheNonResourceValidateState(List roNonResourceFiles) {
- // do nothing
- }
-
- /**
- * @see ResourceStateInputProvider#getNonResourceFiles()
- */
- public List getNonResourceFiles() {
- return null;
- }
-
- /**
- * @see ResourceStateInputProvider#getNonResourceInconsistentFiles()
- */
- public List getNonResourceInconsistentFiles() {
- return null;
- }
-
- /**
- * Gets the stateValidator.
- *
- * @return Returns a ResourceStateValidator
- */
- public ResourceStateValidator getStateValidator() {
- if (stateValidator == null)
- stateValidator = createStateValidator();
- return stateValidator;
- }
-
- /**
- * Method createStateValidator.
- *
- * @return ResourceStateValidator
- */
- private ResourceStateValidator createStateValidator() {
- return new ResourceStateValidatorImpl(this);
- }
-
- /**
- * @see ResourceStateValidator#checkActivation(ResourceStateValidatorPresenter)
- */
- public void checkActivation(ResourceStateValidatorPresenter presenter) throws CoreException {
- getStateValidator().checkActivation(presenter);
- }
-
- /**
- * @see ResourceStateValidator#lostActivation(ResourceStateValidatorPresenter)
- */
- public void lostActivation(ResourceStateValidatorPresenter presenter) throws CoreException {
- getStateValidator().lostActivation(presenter);
- }
-
- /**
- * @see ResourceStateValidator#validateState(ResourceStateValidatorPresenter)
- */
- public IStatus validateState(ResourceStateValidatorPresenter presenter) throws CoreException {
- return getStateValidator().validateState(presenter);
- }
-
- /**
- * @see ResourceStateValidator#checkSave(ResourceStateValidatorPresenter)
- */
- public boolean checkSave(ResourceStateValidatorPresenter presenter) throws CoreException {
- return getStateValidator().checkSave(presenter);
- }
-
- /**
- * @see ResourceStateValidator#checkReadOnly()
- */
- public boolean checkReadOnly() {
- return getStateValidator().checkReadOnly();
- }
-
- /**
- * Return the ResourceSet from the Nature.
- *
- * @return org.eclipse.emf.ecore.resource.ResourceSet
- */
- public ResourceSet getResourceSet() {
- ResourceSet resourceSet = null;
- if (getEmfContext() != null)
- resourceSet = getEmfContext().getResourceSet();
- return resourceSet;
- }
-
- protected void resourceIsLoadedChanged(Resource aResource, boolean oldValue, boolean newValue) {
- if (!isReverting && hasListeners()) {
- int eventCode = newValue ? EditModelEvent.LOADED_RESOURCE : EditModelEvent.UNLOADED_RESOURCE;
- EditModelEvent evt = new EditModelEvent(eventCode, this);
- evt.addResource(aResource);
- notifyListeners(evt);
- }
- }
-
- public Resource getResource(URI aUri) {
- Resource res = getAndLoadLocalResource(aUri);
- if (res == null)
- res = WorkbenchResourceHelper.getOrCreateResource(aUri, getResourceSet());
- if (res != null)
- processResource(res);
- return res;
- }
-
- protected void processResource(Resource aResource) {
- if (aResource != null && !getResources().contains(aResource)) {
- if (aResource instanceof ReferencedResource) {
- access((ReferencedResource) aResource);
- // We need a better way to pass this through the save options instead.
- // We also need to make this dynamic based on the project target
- ((ReferencedResource) aResource).setFormat(CompatibilityXMIResource.FORMAT_MOF5);
- } else if (aResource instanceof CompatibilityXMIResource) {
- ((CompatibilityXMIResource) aResource).setFormat(CompatibilityXMIResource.FORMAT_MOF5);
- }
-
- addResource(aResource);
- }
- }
-
- protected void addResource(Resource aResource) {
- getResources().add(aResource);
- aResource.eAdapters().add(resourceAdapter);
- }
-
- /**
- * Return a Resource for
- *
- * @aUri.
- */
- // TODO The following method will only use the last segment when looking for a resource.
- protected Resource getResource(List tResources, URI aUri) {
- Resource resource;
- for (int i = 0; i < tResources.size(); i++) {
- resource = (Resource) tResources.get(i);
- if (ExtendedEcoreUtil.endsWith(resource.getURI(), aUri))
- return resource;
- }
- return null;
- }
-
- public Resource createResource(URI uri) {
- Resource resource = getExistingOrCreateResource(uri);
- processResource(resource);
- return resource;
- }
-
- /**
- * Get a cached Resource, either local or in the ResourceSet, before creating a Resource. This
- * api handles the case that the Resource may be created during a demand load that failed.
- */
- public Resource getExistingOrCreateResource(URI uri) {
- Resource res = getAndLoadLocalResource(uri);
- if (res == null)
- res = WorkbenchResourceHelperBase.getExistingOrCreateResource(uri, getResourceSet());
- return res;
- }
-
- /**
- * Return a Resource for
- *
- * @aUri.
- */
- protected Resource getAndLoadLocalResource(URI aUri) {
- Resource resource = getLocalResource(aUri);
- if (null != resource && !resource.isLoaded()) {
- try {
- resource.load(Collections.EMPTY_MAP); // reload it
- } catch (IOException e) {
- // Ignore
- }
- }
- return resource;
- }
-
- /**
- * Return a Resource for
- *
- * @aUri.
- */
- protected Resource getLocalResource(URI aUri) {
- return getResource(getResources(), aUri);
- }
-
- /*
- * Return true if this is a ReadOnly EditModel or if we should only access unknown URIs as
- * ReadOnly.
- */
- protected boolean shouldAccessForRead(ReferencedResource aResource) {
- return isReadOnly() || (accessAsReadForUnKnownURIs && !isInterrestedInResource(aResource));
- }
-
- /**
- * Save only resources that need to be saved (i.e., no other references).
- */
- public void resourceChanged(EditModelEvent anEvent) {
- int code = anEvent.getEventCode();
- switch (code) {
- case EditModelEvent.REMOVED_RESOURCE : {
- if (!isReverting && hasResourceReference(anEvent.getChangedResources()))
- removeResources(anEvent.getChangedResources());
- else
- return;
- break;
- }
- case EditModelEvent.ADDED_RESOURCE :
- if (!processResourcesIfInterrested(anEvent.getChangedResources()))
- return;
- }
- if (hasListeners()) {
- anEvent.setEditModel(this);
- notifyListeners(anEvent);
- }
- }
-
- /**
- * Return true if aResource is referenced by me.
- */
- protected boolean hasResourceReference(Resource aResource) {
- if (aResource != null)
- return getResources().contains(aResource);
- return false;
- }
-
- /**
- * Return true if any Resource in the list of
- *
- * @resources is referenced by me.
- */
- protected boolean hasResourceReference(List tResources) {
- for (int i = 0; i < tResources.size(); i++) {
- if (hasResourceReference((Resource) tResources.get(i)))
- return true;
- }
- return false;
- }
-
- /**
- * Remove reference to the Resource objects in
- *
- * @aList. This should be called when one or more Resource objects are removed from the
- * ResourceSet without the reference count going to zero.
- */
- protected void removeResources(List aList) {
- Resource res;
- for (int i = 0; i < aList.size(); i++) {
- res = (Resource) aList.get(i);
- if (removeResource(res) && res instanceof ReferencedResource)
- removedResource((ReferencedResource) res);
- }
- }
-
- private final void removedResource(ReferencedResource referencedResource) {
- if (!isReadOnly() && referencedResource.wasReverted()) {
- isReverting = true;
- try {
- reverted(referencedResource);
- } finally {
- isReverting = false;
- }
- }
- }
-
- protected boolean removeResource(URI uri) {
- Resource res = getLocalResource(uri);
- return removeResource(res);
- }
-
- /**
- * Remove reference to the aResource.
- */
- protected boolean removeResource(Resource aResource) {
- if (aResource != null) {
- aResource.eAdapters().remove(resourceAdapter);
- return getResources().remove(aResource);
- }
- return false;
- }
-
- /**
- * Subclasses should override to post process a removed ReferencedResource.
- *
- * @see J2EEEditModel#revertAllResources()
- */
- protected void reverted(ReferencedResource revertedResource) {
- revertAllResources();
- }
-
- protected void revertAllResources() {
- List someResources = getSortedResources();
- for (int i = 0; i < someResources.size(); i++)
- ((Resource) someResources.get(i)).unload();
- getResources().removeAll(someResources);
- for (int i = 0; i < someResources.size(); i++)
- ((Resource) someResources.get(i)).eAdapters().remove(resourceAdapter);
- }
-
- /**
- * group the resources by XMI first, then XML
- */
- protected List getSortedResources() {
-
- List theResources = getResources();
- int size = theResources.size();
- if (size == 0)
- return Collections.EMPTY_LIST;
- Resource[] sorted = new Resource[size];
- int xmlInsertPos = size - 1;
- int xmiInsertPos = 0;
- Resource res = null;
- for (int i = 0; i < size; i++) {
- res = (Resource) theResources.get(i);
- if (res instanceof TranslatorResource)
- sorted[xmlInsertPos--] = res;
- else
- sorted[xmiInsertPos++] = res;
- }
-
- return Arrays.asList(sorted);
- }
-
- /**
- * Process Resources that we are interrested in.
- */
- protected boolean processResourcesIfInterrested(List someResources) {
- int size = someResources.size();
- Resource res;
- boolean processed = false;
- for (int i = 0; i < size; i++) {
- res = (Resource) someResources.get(i);
- if ((res != null) && (isInterrestedInResource(res))) {
- processResource(res);
- processed = true;
- }
- }
- return processed;
- }
-
- public EMFWorkbenchContext getEmfContext() {
- if (isDisposed())
- throw new IllegalStateException("Edit Model already disposed"); //$NON-NLS-1$
- if (emfContext == null)
- throw new IllegalStateException("EMF context is null"); //$NON-NLS-1$
- return emfContext;
- }
-
- public boolean isDisposed() {
- return disposed;
- }
-
-
-
- public IProject getProject() {
- return project;
- }
-
- /**
- * This method should only be called by the EMFWorkbenchContext.
- */
- public void access(Object accessorKey) {
- registry.access(accessorKey);
- }
-
- /**
- * Access
- *
- * @aResource for read or write.
- */
- protected void access(ReferencedResource aResource) {
- if (shouldAccessForRead(aResource))
- aResource.accessForRead();
- else
- aResource.accessForWrite();
- }
-
- /**
- * This method should be called from each client when they are finished working with the
- * EditModel.
- */
- public void releaseAccess(Object accessorKey) {
-
- registry.release(accessorKey);
-
- if (!isDisposing()) {
- synchronized (this) {
- if (registry.size() == 0) {
- dispose();
- }
- }
- }
- }
-
- /**
- * Release each of the referenced resources.
- */
- protected void release(Resource aResource) {
-
- removeResource(aResource);
- if (aResource != null && aResource instanceof ReferencedResource)
- release((ReferencedResource) aResource);
- }
-
- /**
- * Release each of the referenced resources.
- */
- protected void release(ReferencedResource aResource) {
- if (isReadOnly())
- aResource.releaseFromRead();
- else
- aResource.releaseFromWrite();
-
- }
-
- /**
- * Release each of the referenced resources.
- */
- protected void releaseResources() {
- List tResources = getSortedResources();
- Resource resource;
- for (int i = 0; i < tResources.size(); i++) {
- resource = (Resource) tResources.get(i);
- release(resource);
- }
- }
-
- public void deleteResource(Resource aResource) {
- if (aResource == null || resources == null || !getResources().contains(aResource))
- return;
- getResourcesTargetedForTermination().add(aResource);
-
- }
-
- /**
- * @return
- */
- protected List getResourcesTargetedForTermination() {
- if (resourcesTargetedForTermination == null)
- resourcesTargetedForTermination = new ArrayList(5);
- return resourcesTargetedForTermination;
- }
-
-
-
- /**
- * Remove my reference to aResource, remove it from the ResourceSet, and delete its file from
- * the Workbench. This only happens if there is currently a reference to
- *
- * @aResource.
- */
- public void primDeleteResource(Resource aResource) {
- if (primFlushResource(aResource)) {
- try {
- getEmfContext().deleteResource(aResource);
- } catch (CoreException e) {
- // what should we do here?
- }
- if (hasListeners()) {
- EditModelEvent event = new EditModelEvent(EditModelEvent.REMOVED_RESOURCE, this);
- event.addResource(aResource);
- notifyListeners(event);
- }
- }
- }
-
- /**
- * Remove my reference to aResource and remove it from the ResourceSet.
- */
- public void flushResource(Resource aResource) {
- if (primFlushResource(aResource)) {
- if (hasListeners()) {
- EditModelEvent event = new EditModelEvent(EditModelEvent.REMOVED_RESOURCE, this);
- event.addResource(aResource);
- notifyListeners(event);
- }
- }
- }
-
- public Set getAffectedFiles() {
- Set aSet = new HashSet();
- List mofResources = getResources();
- for (int i = 0; i < mofResources.size(); i++) {
- Resource aResource = (Resource) mofResources.get(i);
- IFile output = WorkbenchResourceHelper.getFile(aResource);
- if (output != null)
- aSet.add(output);
- }
- return aSet;
- }
-
- protected List resetKnownResourceUris() {
-
- initializeKnownResourceUris();
-
- return knownResourceUris;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/11/2001 4:14:26 PM)
- *
- * @return java.util.List
- */
- public List getResources() {
- if (resources == null)
- resources = new ArrayList(5);
- return resources;
- }
-
- public String[] getResourceURIs() {
- return getResourceURIs(false);
- }
-
- public String[] getResourceURIs(boolean onlyDirty) {
- List list = getResources();
- int dirtyCount = 0;
- String[] uris = new String[list.size()];
- Resource res;
- for (int i = 0; i < list.size(); i++) {
- res = (Resource) list.get(i);
- if (!onlyDirty)
- uris[i] = res.getURI().toString();
- else if (res.isModified()) {
- uris[i] = res.getURI().toString();
- dirtyCount++;
- }
- }
- if (onlyDirty && dirtyCount > 0) {
- String[] dirty = new String[dirtyCount];
- int j = 0;
- for (int i = 0; i < uris.length; i++) {
- if (uris[i] != null) {
- dirty[j] = uris[i];
- j++;
- }
- }
- uris = dirty;
- }
- return uris;
- }
-
- /**
- * Returns the first element in the extent of the resource; logs an error and returns null if
- * the extent is empty
- */
- public static EObject getRoot(Resource aResource) {
- EList extent = aResource.getContents();
- if (extent.size() < 1)
- return null;
- return (EObject) extent.get(0);
- }
-
- /**
- * Handle the failure of
- *
- * @aResource.
- */
- protected void handleSaveFailed(Resource aResource, Exception e) {
- aResource.setModified(true);
- if (isFailedWriteFileFailure(e) && shouldSaveReadOnly(aResource))
- saveResource(aResource);
- else
- primHandleSaveFailed(aResource, e);
- }
-
- /**
- * Return whether any of my resources has been modified.
- */
- protected boolean isAnyResourceDirty() {
- List list = getResources();
- for (int i = 0; i < list.size(); i++) {
- if (((Resource) list.get(i)).isModified())
- return true;
- }
- return false;
- }
-
- /**
- * Return whether a save is needed on the CommandStack
- */
- public boolean isDirty() {
- return isAnyResourceDirty();
- }
-
- protected boolean isFailedWriteFileFailure(Exception ex) {
- return SaveHandlerHeadless.isFailedWriteFileFailure(ex);
- }
-
- /**
- * Return true if you can only read the resources and not write.
- */
- public boolean isReadOnly() {
- return readOnly;
- }
-
- protected boolean isReadOnlyFailure(Exception ex) {
- return false;
- }
-
- public boolean hasReadOnlyResource() {
- try {
- List list = getResources();
- int size = list.size();
- Resource res = null;
- IFile file;
- for (int i = 0; i < size; i++) {
- res = (Resource) list.get(i);
- file = WorkbenchResourceHelper.getFile(res);
- if (file != null && file.isReadOnly())
- return true;
- }
- } catch (NullPointerException e) {
- System.out.println(e);
- }
- return false;
- }
-
- /**
- * @deprecated use createResource(URI) instead
- */
- public Resource makeResource(String aUri) {
- return createResource(URI.createURI(aUri));
- }
-
- /**
- * Return whether any of my resources has a reference count of one and it has been modified.
- */
- public boolean needsToSave() {
- return !isShared() && isDirty();
- }
-
- /**
- * Remove my reference to aResource and remove it from the ResourceSet. Return true if aResource
- * was removed.
- */
- protected boolean primFlushResource(Resource aResource) {
- if (aResource != null && hasResourceReference(aResource)) {
- removeResource(aResource);
- removeResourceSetResource(aResource);
- return true;
- }
- return false;
- }
-
- /**
- * Handle the failure of
- *
- * @aResource.
- */
- protected void primHandleSaveFailed(Resource aResource, Exception e) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(e);
- Exception nested = null;
- if (e instanceof IWFTWrappedException)
- nested = ((IWFTWrappedException) e).getNestedException();
- else
- nested = e;
-
- throw new SaveFailedException(EMFWorkbenchResourceHandler.getString("An_error_occurred_while_sa_ERROR_"), nested); //$NON-NLS-1$ = "An error occurred while saving."
- }
-
- /**
- * Prompt for a save.
- */
- protected boolean promptToSave(IOperationHandler operationHandler) {
- if (operationHandler == null)
- return false;
- return operationHandler.canContinue(EMFWorkbenchResourceHandler.getString("The_following_resources_ne_UI_"), getResourceURIs(true)); //$NON-NLS-1$ = "The following resources need to be saved but are currently shared, do you want to save now?"
- }
-
- /**
- * This will force all of the referenced Resources to be saved.
- */
- public void primSave(IProgressMonitor monitor) {
- if (isReadOnly())
- return; // do nothing
- deleteResourcesIfNecessary();
- Resource resource;
- if (getResources().isEmpty())
- return; // nothing to save
- List localResources = getSortedResources();
- for (int i = 0; i < localResources.size(); i++) {
- resource = (Resource) localResources.get(i);
- saveResource(resource);
- }
- getCommandStack().saveIsDone();
- if (hasListeners()) {
- EditModelEvent event = new EditModelEvent(EditModelEvent.SAVE, this);
- notifyListeners(event);
- }
- }
-
- /**
- *
- */
- protected void deleteResourcesIfNecessary() {
- if (resourcesTargetedForTermination == null || resourcesTargetedForTermination.size() == 0)
- return;
- Resource deadres = null;
- for (int i = 0; i < getResourcesTargetedForTermination().size(); i++) {
- deadres = (Resource) getResourcesTargetedForTermination().get(i);
- primDeleteResource(deadres);
-
- getResources().remove(deadres);
- getResourcesTargetedForTermination().remove(deadres);
- }
- }
-
-
-
- /**
- * Save
- *
- * @aResource.
- */
- protected void primSaveResource(Resource aResource) throws Exception {
- if (aResource.isModified())
- aResource.save(Collections.EMPTY_MAP);
- }
-
- /**
- * Process resources that have already been loaded.
- */
- protected void processLoadedResources() {
- List loaded = getResourceSet().getResources();
- if (!loaded.isEmpty())
- processResourcesIfInterrested(loaded);
- }
-
- private void processPreloadResources() {
- for (int i = 0; i < preloadResourceUris.size(); i++) {
- URI uri = (URI) preloadResourceUris.get(i);
- getResource(uri);
- }
- }
-
- /**
- * Remove aResource from my ResourceSet. Return true if aResource was removed.
- */
- protected boolean removeResourceSetResource(Resource aResource) {
- aResource.eSetDeliver(false);
- aResource.unload();
- aResource.eSetDeliver(true);
- return getResourceSet().getResources().remove(aResource);
- }
-
- protected void saveResource(Resource resource) {
- try {
- primSaveResource(resource);
- } catch (Exception e) {
- handleSaveFailed(resource, e);
- }
- }
-
- /**
- * Should the resources be saved.
- */
- protected boolean shouldSave() {
- return !isReadOnly() && !isShared();
- }
-
- /**
- * Should the resources be saved.
- */
- protected boolean shouldSave(IOperationHandler operationHandler) {
- return shouldSave() || promptToSave(operationHandler);
- }
-
- protected boolean shouldSaveReadOnly(Resource aResource) {
- IFile aFile = WorkbenchResourceHelper.getFile(aResource);
- if (aFile == null || !aFile.isReadOnly())
- return false;
-
- return getSaveHandler().shouldContinueAndMakeFileEditable(aFile);
- }
-
- /**
- * Force all of the known resource URIs to be loaded if they are not already.
- */
- public void forceLoadKnownResources() {
- List uris = getKnownResourceUris();
- URI uri = null;
- for (int i = 0; i < uris.size(); i++) {
- uri = (URI) uris.get(i);
- getResource(uri);
- }
- }
-
- /**
- * This method should be called when you want to extend this edit model to handle a resource
- * with a URI equal to <code>aRelativeURI</code>.
- */
- public void manageExtensionResourceURI(String aRelativeURI) {
- if (aRelativeURI != null && aRelativeURI.length() > 0) {
- URI uri = URI.createURI(aRelativeURI);
- if (!isInterrestedInResourceUri(uri)) {
- getKnownResourceUris().add(uri);
- // Process the resource if it is already loaded.
- try {
- Resource res = getEmfContext().getResource(uri);
- if (res != null)
- processResource(res);
- } catch (Exception e) {
- // Ignore
- }
- }
- }
- }
-
- /**
- * Get a cached Resource or try to load the Resource prior to creating a Resource. This api
- * handles the case that the Resource may be created during the load.
- */
- public Resource getOrCreateResource(URI uri) {
- return getResource(uri);
- }
-
- /**
- * @return boolean
- */
- public boolean isAccessAsReadForUnKnownURIs() {
- return accessAsReadForUnKnownURIs;
- }
-
- /**
- * Use this api to indicate that you want all unknown Resources to be accessed for ReadOnly.
- *
- * @param b
- */
- public void setAccessAsReadForUnKnownURIs(boolean b) {
- accessAsReadForUnKnownURIs = b;
- }
-
- public String toString() {
- StringBuffer buffer = new StringBuffer(getClass().getName());
- buffer.append(": "); //$NON-NLS-1$
- if (isReadOnly())
- buffer.append(" R = "); //$NON-NLS-1$
- else
- buffer.append(" W = "); //$NON-NLS-1$
- buffer.append(getRegistry().size());
- buffer.append("[ID: \""); //$NON-NLS-1$
- buffer.append(getEditModelID());
- buffer.append("\" Known Resources: ["); //$NON-NLS-1$
- List uris = getKnownResourceUris();
- if (uris != null) {
- int i = 0;
- for (i = 0; i < (uris.size() - 1); i++)
- buffer.append(uris.get(i) + ", "); //$NON-NLS-1$
- buffer.append(uris.get(i));
- buffer.append("]"); //$NON-NLS-1$
- } else
- buffer.append("none"); //$NON-NLS-1$
-
-
- buffer.append("]"); //$NON-NLS-1$
- return buffer.toString();
- }
-
- public Reference getReference() {
- if (reference == null)
- reference = new Reference();
- return reference;
- }
-
- /**
- * @return
- */
- protected ClientAccessRegistry getRegistry() {
- return registry;
- }
-
- public class Reference {
-
- protected String tostring = null;
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- public String toString() {
- if (tostring == null) {
- StringBuffer result = new StringBuffer("EditModel.Reference ["); //$NON-NLS-1$
- result.append("{"); //$NON-NLS-1$
- result.append(getEditModelID());
- result.append("} {"); //$NON-NLS-1$
- result.append(getProject().getName());
- result.append("}]"); //$NON-NLS-1$
- tostring = result.toString();
- }
- return tostring;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return toString().hashCode();
- }
- }
-
- /**
- * Subclasses can override - by default this will return the first root object from the first
- * resource referenced by the known resource URIs for this EditModel
- *
- * @return an EObject or Null
- */
- public EObject getPrimaryRootObject() {
- Resource res = getPrimaryResource();
- if (res == null || res.getContents().isEmpty())
- return null;
- return (EObject) res.getContents().get(0);
- }
-
- /**
- * Subclasses can override - by default this will return the first resource referenced by the
- * known resource URIs for this EditModel
- *
- * @return
- */
- public Resource getPrimaryResource() {
- if (knownResourceUris == null)
- getKnownResourceUris();
- if (knownResourceUris == null || knownResourceUris.isEmpty())
- return null;
-
- URI uri = (URI) knownResourceUris.get(0);
- return getResource(uri);
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.enablement.IEnablementIdentifierListener#identifierChanged(org.eclipse.wst.common.frameworks.internal.enablement.EnablementIdentifierEvent)
- */
- public void identifierChanged(EnablementIdentifierEvent evt) {
- if (evt.hasEnabledChanged()) {
- EditModelEvent editModelEvent = new EditModelEvent(EditModelEvent.KNOWN_RESOURCES_ABOUT_TO_CHANGE, this);
- notifyListeners(editModelEvent);
- IEnablementIdentifier id = evt.getIdentifier();
- if (id.isEnabled())
- addKnownResources(id);
- else
- removeKnownResources(id);
- editModelEvent = new EditModelEvent(EditModelEvent.KNOWN_RESOURCES_CHANGED, this);
- notifyListeners(editModelEvent);
- }
- }
-
- private void removeKnownResources(IEnablementIdentifier id) {
- List editModelResources = getEditModelResources(id);
- EditModelResource editModelResource = null;
- ResourceSetWorkbenchEditSynchronizer sync = (ResourceSetWorkbenchEditSynchronizer) getResourceSetSynchronizer();
- for (int i = 0; i < editModelResources.size(); i++) {
- editModelResource = (EditModelResource) editModelResources.get(i);
- if (editModelResource.isAutoLoad() && sync != null) {
- sync.disableAutoload(editModelResource.getURI());
- preloadResourceUris.remove(editModelResource.getURI());
- }
- knownResourceUris.remove(editModelResource.getURI());
- removeResource(editModelResource.getURI());
- }
-
- }
-
-
-
- private void addKnownResources(IEnablementIdentifier id) {
- List editModelResources = getEditModelResources(id);
- EditModelResource editModelResource = null;
- ResourceSetWorkbenchEditSynchronizer sync = (ResourceSetWorkbenchEditSynchronizer) getResourceSetSynchronizer();
- for (int i = 0; i < editModelResources.size(); i++) {
- editModelResource = (EditModelResource) editModelResources.get(i);
- if (editModelResource.isAutoLoad() && sync != null) {
- sync.enableAutoload(editModelResource.getURI());
- preloadResourceUris.add(editModelResource.getURI());
- getResource(editModelResource.getURI());
- }
- knownResourceUris.add(editModelResource.getURI());
-
- }
- }
-
-
- /**
- * @return Returns the params.
- */
- public Map getParams() {
- return params;
- }
-
- /**
- * @param params
- * The params to set.
- */
- public void setParams(Map params) {
- this.params = params;
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelCommand.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelCommand.java
deleted file mode 100644
index 00eed906e..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelCommand.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-import org.eclipse.emf.common.command.Command;
-
-
-
-/**
- * Insert the type's description here. Creation date: (05/22/01 8:57:00 AM)
- *
- * @author: Administrator
- */
-public abstract class EditModelCommand extends AbstractEditModelCommand {
- protected EditModelCommand() {
- super();
- }
-
- public EditModelCommand(Command targetCommand) {
- super(targetCommand);
- }
-
- public boolean canUndo() {
- return getTarget().canUndo();
- }
-
- protected abstract void executeInModel(AbstractEditModelCommand cmd);
-
- public EditModelCommand getEditModelCommand() {
- return this;
- }
-
- public String getLabel() {
- return getTarget().getLabel();
- }
-
- public void invertAndPush() {
- executeInModel(this.inverted());
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelEvent.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelEvent.java
deleted file mode 100644
index 460a84acb..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelEvent.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-public class EditModelEvent {
- //These are the event codes.
-
- // Used when the edit model is saved.
- public static final int SAVE = 1;
- // Used when the command stack becomes dirty.
- public static final int DIRTY = 2;
- // Used when a referenced resource is removed from the ResourceSet.
- public static final int REMOVED_RESOURCE = 3;
- // Used when a referenced resource is added to the ResourceSet.
- public static final int ADDED_RESOURCE = 4;
- // Used when the edit model is disposed
- public static final int PRE_DISPOSE = 5;
- // Used when a Resource is loaded or the first object
- // is added to the contents when created.
- public static final int LOADED_RESOURCE = 6;
- // Used when a Resource is unloaded.
- public static final int UNLOADED_RESOURCE = 7;
- // Indicates that the list of known resources managed by the edit model is about to change
- public static final int KNOWN_RESOURCES_ABOUT_TO_CHANGE = 8;
- // Indicates that the list of known resources managed by the edit model has changed
- public static final int KNOWN_RESOURCES_CHANGED = 9;
-
- private int eventCode;
- private EditModel editModel;
- private List changedResources;
-
- /**
- * Insert the method's description here. Creation date: (4/12/2001 2:46:59 PM)
- */
- public EditModelEvent(int anEventCode, EditModel model) {
- setEventCode(anEventCode);
- setEditModel(model);
- }
-
- public void addResource(Resource aResource) {
- if (aResource != null)
- getChangedResources().add(aResource);
- }
-
- public void addResources(Collection someResources) {
- if (someResources != null)
- getChangedResources().addAll(someResources);
- }
-
- /**
- * Insert the method's description here. Creation date: (4/12/2001 2:46:43 PM)
- *
- * @return java.util.List
- */
- public java.util.List getChangedResources() {
- if (changedResources == null)
- changedResources = new ArrayList();
- return changedResources;
- }
-
- /**
- * Insert the method's description here. Creation date: (05/21/01 9:01:08 PM)
- *
- * @return com.ibm.etools.j2ee.workbench.EditModel
- */
- public EditModel getEditModel() {
- return editModel;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/12/2001 2:46:43 PM)
- *
- * @return int
- */
- public int getEventCode() {
- return eventCode;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/12/2001 2:46:43 PM)
- *
- * @param newChangedResources
- * java.util.List
- */
- public void setChangedResources(java.util.List newChangedResources) {
- changedResources = newChangedResources;
- }
-
- /**
- * Insert the method's description here. Creation date: (05/21/01 9:01:08 PM)
- *
- * @param newEditModel
- * com.ibm.etools.j2ee.workbench.EditModel
- */
- public void setEditModel(EditModel newEditModel) {
- editModel = newEditModel;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/12/2001 2:46:43 PM)
- *
- * @param newEventCode
- * int
- */
- public void setEventCode(int newEventCode) {
- eventCode = newEventCode;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelFactory.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelFactory.java
deleted file mode 100644
index d97bbe447..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelFactory.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-
-import java.util.Map;
-
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext;
-
-
-public class EditModelFactory implements IEditModelFactory {
- protected boolean loadKnownResourcesAsReadOnly = true;
-
- public EditModel createEditModelForRead(String editModelID, EMFWorkbenchContext context) {
- return createEditModelForRead(editModelID, context, null);
- }
-
- public EditModel createEditModelForWrite(String editModelID, EMFWorkbenchContext context) {
- return createEditModelForWrite(editModelID, context, null);
- }
-
- public EditModel createEditModelForRead(String editModelID, EMFWorkbenchContext context, Map params) {
- EditModel editModel = new EditModel(editModelID, context, true);
- editModel.setAccessAsReadForUnKnownURIs(loadKnownResourcesAsReadOnly);
- return editModel;
- }
-
- public EditModel createEditModelForWrite(String editModelID, EMFWorkbenchContext context, Map params) {
- EditModel editModel = new EditModel(editModelID, context, false);
- editModel.setAccessAsReadForUnKnownURIs(loadKnownResourcesAsReadOnly);
- return editModel;
- }
-
- public String getCacheID(String editModelID, Map params) {
- return editModelID;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.internal.emfworkbench.integration.IEditModelFactory#setLoadKnownResourcesAsReadOnly(boolean)
- */
- public void setLoadKnownResourcesAsReadOnly(boolean value) {
- this.loadKnownResourcesAsReadOnly = value;
- }
-
- /**
- * @return Returns the loadKnownResourcesAsReadOnly.
- */
- protected boolean isLoadKnownResourcesAsReadOnly() {
- return loadKnownResourcesAsReadOnly;
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelListener.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelListener.java
deleted file mode 100644
index aefe9e49d..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelListener.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-
-/**
- * Insert the type's description here. Creation date: (4/11/2001 4:45:13 PM)
- *
- * @author: Administrator
- */
-public interface EditModelListener {
- /**
- * An event ocurred on the J2EEEditModel.
- */
- void editModelChanged(EditModelEvent anEvent);
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelNature.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelNature.java
deleted file mode 100644
index f80a886b9..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelNature.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 4, 2004
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-import java.util.Map;
-
-import org.eclipse.jem.util.emf.workbench.nature.EMFNature;
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext;
-
-/**
- * @author schacher
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public abstract class EditModelNature extends EMFNature {
- /**
- *
- */
- public EditModelNature() {
- super();
- }
-
- public EditModel getEditModelForRead(String editModelKey, Object accessorKey) {
- return getEditModelForRead(editModelKey, accessorKey, null);
- }
-
- public EditModel getEditModelForWrite(String editModelKey, Object accessorKey) {
- return getEditModelForWrite(editModelKey, accessorKey, null);
- }
-
- public EditModel getEditModelForRead(String editModelKey, Object accessorKey, Map params) {
- EditModel result = null;
- if (getEmfContext() != null)
- result = getEmfContext().getEditModelForRead(editModelKey, accessorKey, params);
- return result;
- }
-
- public EditModel getEditModelForWrite(String editModelKey, Object accessorKey, Map params) {
- EditModel result = null;
- if (getEmfContext() != null)
- result = getEmfContext().getEditModelForWrite(editModelKey, accessorKey, params);
- return result;
- }
-
- protected EMFWorkbenchContext getEmfContext() {
- return (EMFWorkbenchContext) getEmfContextBase();
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/IEditModelFactory.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/IEditModelFactory.java
deleted file mode 100644
index 873209f5b..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/IEditModelFactory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-import java.util.Map;
-
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext;
-
-
-public interface IEditModelFactory {
-
- public abstract EditModel createEditModelForRead(String editModelID, EMFWorkbenchContext context);
-
- public abstract EditModel createEditModelForRead(String editModelID, EMFWorkbenchContext context, Map params);
-
- public abstract EditModel createEditModelForWrite(String editModelID, EMFWorkbenchContext context);
-
- public abstract EditModel createEditModelForWrite(String editModelID, EMFWorkbenchContext context, Map params);
-
- public String getCacheID(String editModelID, Map params);
-
- public void setLoadKnownResourcesAsReadOnly(boolean value);
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/LooseComposedEditModel.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/LooseComposedEditModel.java
deleted file mode 100644
index f9a5f82a2..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/LooseComposedEditModel.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext;
-
-
-/**
- * @author Administrator
- */
-public class LooseComposedEditModel extends ComposedEditModel {
-
- public LooseComposedEditModel(String editModelID, EMFWorkbenchContext context) {
- super(editModelID, context);
-
- }
-
- public EditModel.Reference addChild(EditModel editModel) {
- getChildren().add(editModel);
- Reference ref = editModel.getReference();
- getChildrenMap().put(ref, editModel);
- return ref;
- }
-
- public void removeChild(EditModel editModel) {
- getChildren().remove(editModel);
- getChildrenMap().remove(editModel.getReference());
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModelModifier.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModelModifier.java
deleted file mode 100644
index 53d88ec79..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModelModifier.java
+++ /dev/null
@@ -1,615 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
-
-/**
- * Insert the type's description here. Creation date: (4/6/2001 3:40:35 PM)
- *
- * @author: Administrator
- */
-public class ModelModifier {
- private static final String SET_PATTERN = "Set {0}"; //$NON-NLS-1$
- private static final String ADD_PATTERN = "Add {0}"; //$NON-NLS-1$
- private static final String REMOVE_PATTERN = "Remove {0}"; //$NON-NLS-1$
- private static final String DEFAULT_COMMAND_LABEL = "Command"; //$NON-NLS-1$
- private EditingDomain editingDomain;
- private List helpers;
- private List extendedHelpers;
- protected List additionalCommands;
- protected int status;
- public static final int NO_VALUE_CHANGE = 0;
- public static final int VALUE_CHANGE = 1;
- public static final int ERROR = 2;
-
- /**
- * J2EEModelModifier constructor comment.
- */
- public ModelModifier() {
- super();
- }
-
- /**
- * J2EEModelModifier constructor comment.
- *
- * @param aDomain
- * EditingDomain
- */
- public ModelModifier(EditingDomain aDomain) {
- setEditingDomain(aDomain);
- }
-
- /**
- * Add
- *
- * @aHelper to the list of helper that will be executed.
- */
- public void addHelper(ModifierHelper aHelper) {
- if (aHelper != null && !getHelpers().contains(aHelper))
- getHelpers().add(aHelper);
- }
-
- public void addAdditionalCommand(Command aCommand) {
- if (aCommand != null && !getAdditionalCommands().contains(aCommand))
- additionalCommands.add(aCommand);
- }
-
- /**
- * Return true if this modifier can create a command that will perform the necessary operation.
- */
- public boolean canExecuteCommand() {
- return getEditingDomain() != null;
- }
-
- public int executeWithStatus() {
- try {
- execute();
- return status;
- } finally {
- status = -1;
- }
- }
-
- /**
- * Execute this modifier using the recording mechanism of the StructedTextUndoManager. If this
- * modifier cannot record, try to execute using the CommandStack (if it can execute commands).
- * Return true if the execution was attempted.
- *
- * @see canExecuteCommand()
- * @see canRecord()
- * @see run()
- */
- public boolean execute(ModifierHelper aHelper) {
- addHelper(aHelper);
- return execute();
- }
-
- /**
- * Execute this modifier using the recording mechanism of the StructedTextUndoManager. If this
- * modifier cannot record, try to execute using the CommandStack (if it can execute commands).
- * Return true if the execution was attempted.
- *
- * @see canExecuteCommand()
- * @see canRecord()
- * @see run()
- */
- public boolean execute(List someHelpers) {
- setHelpers(someHelpers);
- return execute();
- }
-
- /**
- * Execute this modifier by creating a Command that is executed on the CommandStack. If this
- * modifier cannot execute commands, the execution will not take place. Return true if the
- * execution was attempted.
- *
- * @see canExecuteCommand()
- */
- public boolean execute() {
- boolean result = false;
- if (canExecuteCommand()) {
- try {
- Command command = createCommand();
- result = command != null;
- if (result) {
- getCommandStack().execute(command);
- }
- } finally {
- release();
- }
- } else {
- setStatus(ERROR);
- }
- return result;
- }
-
- protected CommandStack getCommandStack() {
- if (getEditingDomain() != null)
- return getEditingDomain().getCommandStack();
- return null;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 2:53:17 PM)
- *
- * @return EditingDomain
- */
- public EditingDomain getEditingDomain() {
- return editingDomain;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/10/2001 8:46:35 AM)
- *
- * @return J2EEModifierHelper
- */
- public ModifierHelper getFirstHelper() {
- if (helpers != null && getHelpers().size() > 0)
- return (ModifierHelper) getHelpers().get(0);
- return null;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/10/2001 8:46:35 AM)
- *
- * @return java.util.List
- */
- public java.util.List getHelpers() {
- if (helpers == null)
- helpers = new ArrayList();
- return helpers;
- }
-
- public java.util.List getAdditionalCommands() {
- if (additionalCommands == null)
- additionalCommands = new ArrayList();
- return additionalCommands;
- }
-
- /**
- * Release all model artifacts.
- */
- protected void release() {
- setEditingDomain(null);
- setHelpers(null);
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 2:53:17 PM)
- *
- * @param newEditingDomain
- * EditingDomain
- */
- public void setEditingDomain(EditingDomain newEditingDomain) {
- editingDomain = newEditingDomain;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/10/2001 8:46:35 AM)
- *
- * @param newHelpers
- * java.util.List
- */
- public void setHelpers(java.util.List newHelpers) {
- helpers = newHelpers;
- }
-
- protected void setStatus(int statusCode) {
- if (statusCode > status)
- status = statusCode;
- }
-
- /**
- * Return an AddCommand that will be executed by a CommandStack.
- */
- protected Command createAddCommand(ModifierHelper aHelper) {
- Object value = getValue(aHelper);
- Command command = null;
- if (valueChanged(aHelper.getOwner(), aHelper.getFeature(), value, false)) {
- command = AddCommand.create(getEditingDomain(), aHelper.getOwner(), aHelper.getFeature(), value);
- ((AbstractCommand) command).setLabel(createCommandLabel(ADD_PATTERN, aHelper.getFeature()));
- setStatus(VALUE_CHANGE);
- } else {
- setStatus(NO_VALUE_CHANGE);
- }
- return command;
- }
-
- /**
- * Return a Command that will be executed by a CommandStack. The default is to return null.
- * Subclasses should override this method.
- */
- public Command createCommand() {
- Command chainedCommand = createCommand(null, getHelpers());
- if (null == chainedCommand && additionalCommands != null && additionalCommands.isEmpty()) {
- setStatus(ERROR);
- return null;
- }
- chainedCommand = appendAdditionalCommands(chainedCommand);
- return chainedCommand;
- }
-
- protected Command createCommand(Command chainedCommand, List helpersArg) {
- if (null == extendedHelpers) {
- extendedHelpers = new ArrayList();
- }
-
- if (!helpersArg.isEmpty()) {
- Iterator it = helpersArg.iterator();
- Command nextCommand = null;
- while (it.hasNext()) {
- nextCommand = createCommand((ModifierHelper) it.next());
- if (chainedCommand == null)
- chainedCommand = nextCommand;
- else if (nextCommand != null)
- chainedCommand = chainedCommand.chain(nextCommand);
- }
- }
- if (!extendedHelpers.isEmpty()) {
- List copy = new ArrayList();
- copy.addAll(extendedHelpers);
- extendedHelpers.clear();
- chainedCommand = createCommand(chainedCommand, copy);
- }
- return chainedCommand;
- }
-
- protected Command appendAdditionalCommands(Command chainedCommand) {
- if (additionalCommands != null && !additionalCommands.isEmpty()) {
- Command command;
- for (int i = 0; i < additionalCommands.size(); i++) {
- command = (Command) additionalCommands.get(i);
- if (chainedCommand == null)
- chainedCommand = command;
- else
- chainedCommand = chainedCommand.chain(command);
- }
- }
- return chainedCommand;
- }
-
- /**
- * Return a Command that will be executed by a CommandStack.
- */
- protected Command createCommand(ModifierHelper aHelper) {
- if (aHelper == null)
- return null;
- Command command1, command2;
- ModifierHelper ownerHelper = aHelper.getOwnerHelper();
- if (aHelper.shouldUnsetValue() && ownerHelper != null)
- return null; //we are unsetting a value on an owner that does not exist so do not
- // create the owner
- command1 = createCommand(ownerHelper);
- command2 = primCreateCommand(aHelper);
-
- if (command1 != null) {
- if (command2 == null)
- command2 = command1;
- else
- command2 = command2.chain(command1);
- }
- return command2;
- }
-
- protected String createCommandLabel(String aPattern, EStructuralFeature feature) {
- String replacement = feature == null ? DEFAULT_COMMAND_LABEL : feature.getName();
- return java.text.MessageFormat.format(aPattern, new String[]{replacement});
- }
-
- /**
- * Return a Command that will be executed by a CommandStack. The default is to return null.
- * Subclasses should override this method.
- */
- protected Command createManyCommand(ModifierHelper aHelper) {
- if (aHelper.shouldUnsetValue())
- return createRemoveCommand(aHelper);
- return createAddCommand(aHelper);
- }
-
- protected EObject createObjectFromHelper(ModifierHelper aHelper) {
- return aHelper.createNewObjectFromFeature();
- }
-
- public class ProxyWrappingCommand extends AbstractCommand {
- protected Command baseCommand = null;
- protected EObject eObject = null;
- protected Resource resource = null;
-
- public ProxyWrappingCommand(Command baseCommand, EObject eObject) {
- this.baseCommand = baseCommand;
- this.eObject = eObject;
- this.resource = eObject.eResource();
- }
-
- public boolean canExecute() {
- return baseCommand.canExecute();
- }
-
- public void execute() {
- ExtendedEcoreUtil.becomeProxy(eObject, resource);
- baseCommand.execute();
- }
-
- public boolean canUndo() {
- return baseCommand.canUndo();
- }
-
- public void undo() {
- baseCommand.undo();
- ExtendedEcoreUtil.removeProxy(eObject, resource);
- }
-
- public void redo() {
- baseCommand.redo();
- }
-
- public Collection getResult() {
- return baseCommand.getResult();
- }
-
- public Collection getAffectedObjects() {
- return baseCommand.getAffectedObjects();
- }
-
- public String getLabel() {
- return baseCommand.getLabel();
- }
-
- public String getDescription() {
- return baseCommand.getDescription();
- }
-
- public void dispose() {
- super.dispose();
- baseCommand.dispose();
- }
- }
-
- /**
- * Return a Remove Command that will be executed by a CommandStack.
- */
- protected Command createRemoveCommand(ModifierHelper aHelper) {
- Object value = getValue(aHelper);
- Command command = null;
- EStructuralFeature feature = aHelper.getFeature();
- if (valueChanged(aHelper.getOwner(), feature, value, true)) {
- if (isValueEqual(aHelper, value)) {
- command = RemoveCommand.create(getEditingDomain(), aHelper.getOwner(), feature, (Collection) value);
- } else {
- command = RemoveCommand.create(getEditingDomain(), aHelper.getOwner(), feature, value);
- }
- ((AbstractCommand) command).setLabel(createCommandLabel(REMOVE_PATTERN, feature));
- setStatus(VALUE_CHANGE);
- } else {
- setStatus(NO_VALUE_CHANGE);
- }
- return command;
- }
-
- private boolean isValueEqual(ModifierHelper aHelper, Object value) {
- return aHelper.getOwner().eGet(aHelper.getFeature()) == value;
- }
-
- /**
- * Return a SetCommand that will be executed by a CommandStack.
- */
- protected Command createSingleCommand(ModifierHelper aHelper) {
- Object value = getValue(aHelper);
- Command command = null;
- if (valueChanged(aHelper.getOwner(), aHelper.getFeature(), value, aHelper.shouldUnsetValue())) {
- command = SetCommand.create(getEditingDomain(), aHelper.getOwner(), aHelper.getFeature(), value);
- ((AbstractCommand) command).setLabel(createCommandLabel(SET_PATTERN, aHelper.getFeature()));
- setStatus(VALUE_CHANGE);
- } else {
- setStatus(NO_VALUE_CHANGE);
- }
- return command;
- }
-
- protected Object createValueFromHelper(ModifierHelper aHelper) {
- EObject newObject = createObjectFromHelper(aHelper);
- setNewObjectAttributes(newObject, aHelper);
- return newObject;
- }
-
- protected boolean enumValueChanged(EObject anObject, EStructuralFeature aFeature, Object aValue) {
- if (!anObject.eIsSet(aFeature))
- return true;
- Enumerator existingEnumerator = (Enumerator) anObject.eGet(aFeature);
- Enumerator newEnumerator = getEnumerator(aFeature, aValue);
- return existingEnumerator != newEnumerator;
- }
-
- private Enumerator getEnumerator(EStructuralFeature aFeature, Object aValue) {
- if (aValue instanceof Enumerator)
- return (Enumerator) aValue;
- EEnum anEnum = (EEnum) aFeature.getEType();
- EEnumLiteral literal = null;
- if (aValue instanceof String)
- literal = anEnum.getEEnumLiteral((String) aValue);
- else if (aValue instanceof Integer)
- literal = anEnum.getEEnumLiteral(((Integer) aValue).intValue());
- if (literal != null)
- return literal.getInstance();
- return null;
- }
-
- protected Object getValue(ModifierHelper aHelper) {
- if (aHelper.mustCreateValue()) {
- Object value = createValueFromHelper(aHelper);
- aHelper.setValue(value);
- }
- return aHelper.getValue();
- }
-
- protected boolean manyValueChanged(EObject anObject, EStructuralFeature aFeature, Object aValue, boolean isUnset) {
- List list = (List) anObject.eGet(aFeature);
- if (isUnset)
- return list.contains(aValue) || (list == aValue && !list.isEmpty());
- return !list.contains(aValue);
- }
-
- /**
- * Return a Command that will be executed by a CommandStack. The default is to return null.
- * Subclasses should override this method.
- */
- protected Command primCreateCommand(ModifierHelper aHelper) {
- Command command = doCreateCommand(aHelper);
- if (aHelper.shouldUnsetValue()) {
- Object value = aHelper.getValue();
- if (value instanceof EObject && !((EObject) value).eIsProxy()) {
- command = new ProxyWrappingCommand(command, (EObject) value);
- }
- }
- return command;
- }
-
- protected Command doCreateCommand(ModifierHelper aHelper) {
- if (!aHelper.isComplete()) {
- setStatus(ERROR);
- return null;
- }
- Command command = null;
- if (aHelper.getFeature().isMany())
- command = createManyCommand(aHelper);
- else
- command = createSingleCommand(aHelper);
-
- if (null != command) {
- List localHelpers = ModifierHelperRegistry.getInstance().getHelpers(aHelper);
- if (null != localHelpers) {
- extendedHelpers.addAll(localHelpers);
- }
- }
- return command;
-
- }
-
- /**
- * Run using
- *
- * @aHelper. This will set a MOF attibute value to the owner of the helper.
- */
- protected void primRun(ModifierHelper aHelper) {
- if (aHelper.isComplete()) {
- Object value = getValue(aHelper);
- if (valueChanged(aHelper.getOwner(), aHelper.getFeature(), value, aHelper.shouldUnsetValue()))
- setObjectAttribute(aHelper.getOwner(), aHelper.getFeature(), value, aHelper.shouldUnsetValue());
- }
- }
-
- /**
- * The default is to do nothing. Subclasses should override this method if they are using
- * recordable commands. The implementation of this method should update the MOF model directly.
- * Any modification will be recorded.
- */
- public void run() {
- if (!getHelpers().isEmpty()) {
- Iterator it = getHelpers().iterator();
- while (it.hasNext())
- run((ModifierHelper) it.next());
- }
- }
-
- /**
- * Run using
- *
- * @aHelper's ownerHelper first before running with
- * @aHelper.
- */
- protected void run(ModifierHelper aHelper) {
- if (aHelper != null) {
- run(aHelper.getOwnerHelper());
- primRun(aHelper);
- }
- }
-
- protected void setNewObjectAttributes(EObject anObject, ModifierHelper aHelper) {
- HashMap attributes = aHelper.getAttributes();
- Iterator it = attributes.keySet().iterator();
- EStructuralFeature feature;
- Object value = null;
- while (it.hasNext()) {
- feature = (EStructuralFeature) it.next();
- value = attributes.get(feature);
- setObjectAttribute(anObject, feature, value, false);
- }
- }
-
- protected void setObjectAttribute(EObject anObject, EStructuralFeature aFeature, Object aValue, boolean shouldUnsetValue) {
- if (aFeature.isMany())
- setObjectManyAttribute(anObject, aFeature, aValue, shouldUnsetValue);
- else
- setObjectSingleAttribute(anObject, aFeature, aValue, shouldUnsetValue);
- }
-
- protected void setObjectEnumAttribute(EObject anObject, EStructuralFeature aFeature, Object aValue) {
- Enumerator enumerator = getEnumerator(aFeature, aValue);
- anObject.eSet(aFeature, enumerator);
- }
-
- protected void setObjectManyAttribute(EObject anObject, EStructuralFeature aFeature, Object aValue, boolean shouldUnsetValue) {
- List list = (List) anObject.eGet(aFeature);
- if (shouldUnsetValue)
- list.remove(aValue);
- else
- list.add(aValue);
- }
-
- protected void setObjectSingleAttribute(EObject anObject, EStructuralFeature aFeature, Object aValue, boolean shouldUnsetValue) {
- if (shouldUnsetValue)
- anObject.eUnset(aFeature);
- else if (aFeature.getEType() instanceof EEnum)
- setObjectEnumAttribute(anObject, aFeature, aValue);
- else
- anObject.eSet(aFeature, aValue);
- }
-
- protected boolean singleValueChanged(EObject anObject, EStructuralFeature aFeature, Object aValue, boolean isUnset) {
- if (aFeature.getEType() instanceof EEnum)
- return enumValueChanged(anObject, aFeature, aValue);
-
- Object existingValue = anObject.eGet(aFeature);
- if (existingValue == null && aValue == null)
- return false;
- if (existingValue != null && !existingValue.equals(aValue))
- return true;
- if (aValue != null && !aValue.equals(existingValue))
- return true;
- return false;
- }
-
- protected boolean valueChanged(EObject anObject, EStructuralFeature aFeature, Object aValue, boolean isUnset) {
- if (aFeature.isMany())
- return manyValueChanged(anObject, aFeature, aValue, isUnset);
- return singleValueChanged(anObject, aFeature, aValue, isUnset);
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelper.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelper.java
deleted file mode 100644
index 1020c31cd..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelper.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-
-import java.util.HashMap;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.EClassImpl;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.internal.emf.utilities.FeatureValueConversionException;
-import org.eclipse.wst.common.internal.emf.utilities.FeatureValueConverter;
-
-/**
- * Insert the type's description here. Creation date: (4/6/2001 3:23:36 PM)
- *
- * @author: Administrator
- */
-public class ModifierHelper {
-
- private EObject owner;
- private ModifierHelper ownerHelper;
- private OwnerProvider ownerProvider;
- private Object value;
- private EStructuralFeature feature;
- private HashMap attributes;
- private boolean shouldUnsetValue = false;
- private String valueXSITypeName;
- private FeatureValueConverter featureValueConverter;
-
- public static final int ACTION_SET = 0;
- public static final int ACTION_UNSET = 1;
- public static final int ACTION_BOTH = 2;
-
- /**
- * J2EEModifierHelper constructor comment.
- */
- public ModifierHelper() {
- super();
- }
-
- /**
- * J2EEModifierHelper constructor comment.
- */
- public ModifierHelper(EObject anOwner, EStructuralFeature aFeature, Object aValue) {
- setOwner(anOwner);
- setFeature(aFeature);
- setValue(aValue);
- }
-
- /**
- * J2EEModifierHelper constructor comment.
- */
- public ModifierHelper(ModifierHelper anOwnerHelper, EStructuralFeature aFeature, Object aValue) {
- setOwnerHelper(anOwnerHelper);
- setFeature(aFeature);
- setValue(aValue);
- }
-
- /**
- * J2EEModifierHelper constructor comment.
- */
- public ModifierHelper(OwnerProvider anOwnerProvider, EStructuralFeature aFeature, Object aValue) {
- setOwnerProvider(anOwnerProvider);
- setFeature(aFeature);
- setValue(aValue);
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 3:28:16 PM)
- *
- * @return java.util.HashMap
- */
- public void addAttribute(EStructuralFeature aFeature, Object aValue) {
- if (aFeature != null && aValue != null)
- getAttributes().put(aFeature, aValue);
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 3:28:16 PM)
- *
- * @param newValue
- * java.lang.Object
- */
- protected Object convertValue(java.lang.Object newValue) {
- return getFeatureValueConverter().convertValue(newValue, getFeature());
- }
-
- //Calling this will cause the value to be removed or unset from the owner.
- public void doUnsetValue() {
- shouldUnsetValue = true;
- if (value != null && feature != null && !feature.isMany())
- setValue(null);
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 3:28:16 PM)
- *
- * @return java.util.HashMap
- */
- public java.util.HashMap getAttributes() {
- if (attributes == null)
- attributes = new HashMap();
- return attributes;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 3:28:16 PM)
- *
- * @return org.eclipse.emf.ecore.EFactory
- */
- protected org.eclipse.emf.ecore.EFactory getFactory() {
- return getPackage().getEFactoryInstance();
- }
-
- protected EPackage getPackage() {
- return ((EClassImpl) getFeatureType()).getEPackage();
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 3:28:16 PM)
- *
- * @return org.eclipse.emf.ecore.EStructuralFeature
- */
- public org.eclipse.emf.ecore.EStructuralFeature getFeature() {
- return feature;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 3:28:16 PM)
- *
- * @return EObject
- */
- protected EObject getFeatureType() {
- return getFeature().getEType();
- }
-
- /**
- * Insert the method's description here. Creation date: (5/10/2001 4:51:58 PM)
- *
- * @return com.ibm.etools.j2ee.commands.FeatureValueConverter
- */
- public FeatureValueConverter getFeatureValueConverter() {
- if (featureValueConverter == null)
- featureValueConverter = FeatureValueConverter.DEFAULT;
- return featureValueConverter;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 3:28:16 PM)
- *
- * @return String
- */
- protected String getNewValueTypeName() {
- if (getValueXSITypeName() != null && getValueXSITypeName().length() > 0)
- return getValueXSITypeName();
- return (((EClass) getFeatureType()).getName());
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 3:28:16 PM)
- *
- * @return org.eclipse.emf.ecore.EObject
- */
- public org.eclipse.emf.ecore.EObject getOwner() {
- if (owner == null) {
- OwnerProvider provider = getOwnerProvider();
- EObject providerOwner = null;
- if (provider != null)
- providerOwner = provider.getOwner();
- if (providerOwner == null && getOwnerHelper() != null)
- providerOwner = (EObject) getOwnerHelper().getValue();
- return providerOwner;
- }
- return owner;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/8/2001 2:47:54 PM)
- *
- * @return com.ibm.etools.j2ee.commands.J2EEModifierHelper
- */
- public ModifierHelper getOwnerHelper() {
- if (ownerHelper == null) {
- if (getOwnerProvider() != null && getOwnerProvider().getOwner() == null)
- return getOwnerProvider().getOwnerHelper();
- }
- return ownerHelper;
- }
-
- public ModifierHelper primGetOwnerHelper() {
- return ownerHelper;
- }
-
- /**
- * Insert the method's description here. Creation date: (9/18/2001 1:31:14 PM)
- *
- * @return com.ibm.etools.j2ee.ui.J2EEOwnerProvider
- */
- public OwnerProvider getOwnerProvider() {
- return ownerProvider;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 3:28:16 PM)
- *
- * @return java.lang.Object
- */
- public java.lang.Object getValue() {
- return value;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/10/2001 3:39:31 PM)
- *
- * @return java.lang.String
- */
- public java.lang.String getValueXSITypeName() {
- return valueXSITypeName;
- }
-
- /**
- * This will automatically get called from the J2EEModelModifier before executing so it is not
- * necessary to call it directly.
- */
- public boolean isComplete() {
- boolean result = true;
- if (getOwnerHelper() != null)
- result = getOwnerHelper().isComplete();
- if (!mustCreateValue())
- result = getValue() != null || shouldUnsetValue();
- else
- result = getFeatureType() != null;
- return result && getFeature() != null && (getOwner() != null || getOwnerHelper() != null);
- }
-
- public boolean mustCreateValue() {
- return getValue() == null && getFeature() != null && !shouldUnsetValue();
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 3:28:16 PM)
- *
- * @param newValue
- * java.lang.Object
- */
- public void primSetValue(java.lang.Object newValue) {
- value = newValue;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 3:28:16 PM)
- *
- * @param newFeature
- * org.eclipse.emf.ecore.EStructuralFeature
- */
- public void setFeature(org.eclipse.emf.ecore.EStructuralFeature newFeature) {
- feature = newFeature;
- }
-
- /**
- * Insert the method's description here. Creation date: (5/10/2001 4:51:58 PM)
- *
- * @param newFeatureValueConverter
- * com.ibm.etools.j2ee.commands.FeatureValueConverter
- */
- public void setFeatureValueConverter(FeatureValueConverter newFeatureValueConverter) {
- featureValueConverter = newFeatureValueConverter;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 3:28:16 PM)
- *
- * @param newOwner
- * org.eclipse.emf.ecore.EObject
- */
- public void setOwner(org.eclipse.emf.ecore.EObject newOwner) {
- owner = newOwner;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/8/2001 2:47:54 PM)
- *
- * @param newOwnerHelper
- * com.ibm.etools.j2ee.commands.J2EEModifierHelper
- */
- public void setOwnerHelper(ModifierHelper newOwnerHelper) {
- ownerHelper = newOwnerHelper;
- }
-
- /**
- * Insert the method's description here. Creation date: (9/18/2001 1:31:14 PM)
- *
- * @param newOwnerProvider
- * com.ibm.etools.j2ee.ui.J2EEOwnerProvider
- */
- public void setOwnerProvider(OwnerProvider newOwnerProvider) {
- ownerProvider = newOwnerProvider;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/6/2001 3:28:16 PM)
- *
- * @param newValue
- * java.lang.Object
- */
- public void setValue(java.lang.Object newValue) {
- try {
- primSetValue(convertValue(newValue));
- } catch (FeatureValueConversionException featureException) {
- Logger.getLogger().logError(featureException);
- primSetValue(null);
- }
- }
-
- /**
- * Treat an empty String as a null value. Creation date: (4/6/2001 3:28:16 PM)
- *
- * @param newValue
- * java.lang.Object
- */
- public void setValueFromWidget(String newValue) {
- Object data = newValue;
- if (newValue != null && newValue.length() == 0)
- data = null;
- setValue(data);
- if (data == null)
- doUnsetValue();
- else
- shouldUnsetValue = false;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/10/2001 3:39:31 PM)
- *
- * @param newValueXSITypeName
- * java.lang.String
- */
- public void setValueXSITypeName(java.lang.String newValueXSITypeName) {
- valueXSITypeName = newValueXSITypeName;
- }
-
- public boolean shouldUnsetValue() {
- return shouldUnsetValue;
- }
-
- public EObject createNewObjectFromFeature() {
- EClass metaClass = (EClass) getPackage().getEClassifier(getNewValueTypeName());
- return getFactory().create(metaClass);
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperChainer.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperChainer.java
deleted file mode 100644
index d36148d59..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperChainer.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-
-
-/**
- * @version 1.0
- * @author
- */
-public class ModifierHelperChainer {
-
- ModifierHelper helper;
-
- public ModifierHelperChainer(EStructuralFeature feature, EObject owner, Object value) {
- helper = new ModifierHelper();
-
- if (owner != null)
- helper.setOwner(owner);
-
- helper.setFeature(feature);
-
- if (value != null)
- helper.setValue(value);
-
- }
-
- public ModifierHelper getHelper() {
- return helper;
- }
-
- public void setOwnerBasedOnType(Object owner) {
- if (owner instanceof EObject)
- helper.setOwner((EObject) owner);
- else if (owner instanceof ModifierHelper)
- helper.setOwnerHelper((ModifierHelper) owner);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperFactory.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperFactory.java
deleted file mode 100644
index bc41a627e..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperFactory.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 27, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-/**
- * @author jsholl
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public interface ModifierHelperFactory {
-
-
- /**
- * @param baseHelper
- * @param actionFlag
- * @return
- */
- ModifierHelper getHelper(ModifierHelper baseHelper, int actionFlag);
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperRegistry.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperRegistry.java
deleted file mode 100644
index b1da8ade0..000000000
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperRegistry.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 27, 2004
- *
- * To change the template for this generated file go to Window - Preferences -
- * Java - Code Generation - Code and Comments
- */
-package org.eclipse.wst.common.internal.emfworkbench.integration;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jem.util.logger.proxy.Logger;
-
-/**
- * @author jsholl
- *
- */
-public class ModifierHelperRegistry {
- private static final String PLUGIN_ID = "org.eclipse.wst.common.internal.emfworkbench.integration"; //$NON-NLS-1$
- private static final String EXTENSION_POINT = "ModifierHelperFactory"; //$NON-NLS-1$
- private static final String FACTORY_CLASS = "class"; //$NON-NLS-1$
- private static final String PACKAGE = "package"; //$NON-NLS-1$
- private static final String PACKAGE_URI = "uri"; //$NON-NLS-1$
- private static final String NAME = "name"; //$NON-NLS-1$
- private static final String TYPE = "type"; //$NON-NLS-1$
- private static final String FEATURE = "feature"; //$NON-NLS-1$
- private static final String FEATURE_ACTION = "action"; //$NON-NLS-1$
- private static final String FEATURE_ACTION_SET = "set"; //$NON-NLS-1$
- private static final String FEATURE_ACTION_UNSET = "unset"; //$NON-NLS-1$
- private static final String FEATURE_ACTION_BOTH = "both"; //default //$NON-NLS-1$
- private static ModifierHelperRegistry INSTANCE = null;
- // Hashtable mapping features to a list of FactoryHolders
- private Hashtable featureHash = new Hashtable();
- private Hashtable factoryHash = new Hashtable();
-
- private class FactoryHolder {
- private int actionType;
- private IConfigurationElement element;
-
- public FactoryHolder(IConfigurationElement element, int actionType) {
- this.element = element;
- this.actionType = actionType;
- }
-
- public ModifierHelperFactory getFactory(int actionTypeArg) {
- if (this.actionType == actionTypeArg || this.actionType == ModifierHelper.ACTION_BOTH) {
- String hashKey = getFactoryHash(element);
- ModifierHelperFactory factory = (ModifierHelperFactory) factoryHash.get(hashKey);
- if (null == factory) {
- try {
- factory = (ModifierHelperFactory) element.createExecutableExtension(FACTORY_CLASS);
- factoryHash.put(hashKey, factory);
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- }
- return factory;
- }
- return null;
- }
-
- public boolean equals(Object obj) {
- if (super.equals(obj)) {
- return true;
- }
- FactoryHolder holder = (FactoryHolder) obj;
- return getFactoryHash(element).equals(getFactoryHash(holder.element));
- }
- }
-
- private ModifierHelperRegistry() {
- readExtensions();
- }
-
- private void readExtensions() {
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(PLUGIN_ID, EXTENSION_POINT);
- if (point == null)
- return;
- IConfigurationElement[] elements = point.getConfigurationElements();
- for (int i = 0; i < elements.length; i++) {
- readFactory(elements[i]);
- }
- }
-
- private void readFactory(IConfigurationElement element) {
- String factoryClassName = element.getAttribute(FACTORY_CLASS);
- if (null == factoryClassName) {
- logError(element, "No " + FACTORY_CLASS + " defined."); //$NON-NLS-1$ //$NON-NLS-2$
- }
- IConfigurationElement[] packages = element.getChildren(PACKAGE);
- if (packages.length == 0) {
- logError(element, "No " + PACKAGE + " defined."); //$NON-NLS-1$ //$NON-NLS-2$
- }
- for (int j = 0; j < packages.length; j++) {
- readPackage(element, packages[j]);
- }
- }
-
- private void readPackage(IConfigurationElement factoryElement, IConfigurationElement element) {
- String packageURI = element.getAttribute(PACKAGE_URI);
- if (null == packageURI) {
- logError(element, "No " + PACKAGE_URI + " defined."); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- EPackage ePackage = EPackage.Registry.INSTANCE.getEPackage(packageURI);
- if (null == ePackage) {
- logError(element, PACKAGE + " " + packageURI + " can not be found."); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- IConfigurationElement[] types = element.getChildren(TYPE);
- if (types.length == 0) {
- logError(element, "No " + TYPE + " defined."); //$NON-NLS-1$ //$NON-NLS-2$
- }
- for (int i = 0; i < types.length; i++) {
- readType(factoryElement, ePackage, types[i]);
- }
- }
-
- private void readType(IConfigurationElement factoryElement, EPackage ePackage, IConfigurationElement element) {
- String typeName = element.getAttribute(NAME);
- if (null == typeName) {
- logError(element, "No " + NAME + " defined."); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- EClassifier eClassifier = ePackage.getEClassifier(typeName);
- if (null == eClassifier) {
- logError(element, TYPE + " " + typeName + " can not be found in " + PACKAGE + " " + ePackage.getName()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- return;
- }
- EClass eClass = (EClass) eClassifier;
- IConfigurationElement[] features = element.getChildren(FEATURE);
- if (features.length == 0) {
- logError(element, "No " + FEATURE + " defined."); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- for (int i = 0; i < features.length; i++) {
- readFeature(factoryElement, eClass, features[i]);
- }
- }
-
- private void readFeature(IConfigurationElement factoryElement, EClass eClass, IConfigurationElement element) {
- String featureName = element.getAttribute(NAME);
- if (null == featureName) {
- logError(element, "No " + NAME + " defined."); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- String action = element.getAttribute(FEATURE_ACTION);
- if (null == action) {
- action = FEATURE_ACTION_BOTH;
- }
- int actionType = -1;
- if (action.equalsIgnoreCase(FEATURE_ACTION_BOTH)) {
- actionType = ModifierHelper.ACTION_BOTH;
- } else if (action.equalsIgnoreCase(FEATURE_ACTION_SET)) {
- actionType = ModifierHelper.ACTION_SET;
- } else if (action.equalsIgnoreCase(FEATURE_ACTION_UNSET)) {
- actionType = ModifierHelper.ACTION_UNSET;
- }
- if (actionType == -1) {
- logError(element, "Invalid " + FEATURE_ACTION + "=" + action + " defined. Valid values are: " + FEATURE_ACTION_BOTH + ", " + FEATURE_ACTION_SET + ", or " + FEATURE_ACTION_UNSET); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- return;
- }
- EStructuralFeature feature = null;
- EList allFeatures = eClass.getEAllStructuralFeatures();
- EStructuralFeature tempFeature = null;
- Iterator iterator = allFeatures.iterator();
- while (null == feature && iterator.hasNext()) {
- tempFeature = (EStructuralFeature) iterator.next();
- if (tempFeature.getName().equals(featureName)) {
- feature = tempFeature;
- }
- }
- if (feature == null) {
- logError(element, FEATURE + " " + featureName + " can not be found in " + TYPE + " " + eClass.getName()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- return;
- }
- List factoryHolderList = (List) featureHash.get(feature);
- if (null == factoryHolderList) {
- factoryHolderList = new ArrayList();
- featureHash.put(feature, factoryHolderList);
- }
- FactoryHolder factoryHolder = new FactoryHolder(factoryElement, actionType);
- if (factoryHolderList.contains(factoryHolder)) {
- logError(element, "Duplicate" + FEATURE + ":" + featureName + " defined for " + FACTORY_CLASS + ":" + factoryElement.getAttribute(FACTORY_CLASS)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- return;
- }
- factoryHolderList.add(factoryHolder);
- }
-
- private String getFactoryHash(IConfigurationElement factoryElement) {
- return factoryElement.getDeclaringExtension().getNamespace() + factoryElement.getAttribute(FACTORY_CLASS);
- }
-
- public static void logError(IConfigurationElement element, String text) {
- IExtension extension = element.getDeclaringExtension();
- StringBuffer buf = new StringBuffer();
- buf.append("Plugin " + extension.getNamespace() + ", extension " + extension.getExtensionPointUniqueIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
- buf.append("\n" + text); //$NON-NLS-1$
- Logger.getLogger().logError(buf.toString());
- }
-
- public static ModifierHelperRegistry getInstance() {
- if (null == INSTANCE) {
- INSTANCE = new ModifierHelperRegistry();
- }
- return INSTANCE;
- }
-
- /**
- * returns a list of ModifierHelpers
- *
- * @param baseHelper
- * @param actionFlag
- * @return
- */
- public List getHelpers(ModifierHelper baseHelper) {
- int actionFlag = baseHelper.shouldUnsetValue() ? ModifierHelper.ACTION_UNSET : ModifierHelper.ACTION_SET;
- EStructuralFeature feature = baseHelper.getFeature();
- List factoryList = getFactories(feature, actionFlag);
- if (null == factoryList) {
- return null;
- }
- ArrayList helpers = new ArrayList();
- Iterator it = factoryList.iterator();
- ModifierHelperFactory factory = null;
- while (it.hasNext()) {
- factory = (ModifierHelperFactory) it.next();
- Object helper = factory.getHelper(baseHelper, actionFlag);
- if (null != helper) {
- helpers.add(helper);
- }
- }
- return helpers;
- }
-
- private List getFactories(EStructuralFeature feature, int actionFlag) {
- List factoryHolderList = (List) featureHash.get(feature);
- if (null == factoryHolderList) {
- return null;
- }
- List factoryList = new ArrayList();
- ModifierHelperFactory factory = null;
- for (int i = 0; i < factoryHolderList.size(); i++) {
- factory = ((FactoryHolder) factoryHolderList.get(i)).getFactory(actionFlag);
- if (null != factory) {
- factoryList.add(factory);
- }
- }
- return factoryList;
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/OwnerProvider.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/OwnerProvider.java
deleted file mode 100644