-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1292] Operator: contribute editing domain for a registry
- Loading branch information
1 parent
fb1d074
commit 71ac0dc
Showing
5 changed files
with
64 additions
and
18 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
...eclipse.passage.loc.api/src/org/eclipse/passage/loc/internal/api/EditingDomainSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.eclipse.passage.loc.internal.api; | ||
|
||
import org.eclipse.emf.edit.domain.EditingDomain; | ||
|
||
public interface EditingDomainSource { | ||
|
||
EditingDomain create(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...c/org/eclipse/passage/loc/operator/internal/gear/services/PassageEditingDomainSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.eclipse.passage.loc.operator.internal.gear.services; | ||
|
||
import java.util.HashMap; | ||
|
||
import org.eclipse.emf.common.command.BasicCommandStack; | ||
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; | ||
import org.eclipse.emf.edit.domain.EditingDomain; | ||
import org.eclipse.emf.edit.provider.ComposedAdapterFactory; | ||
import org.eclipse.passage.loc.internal.api.EditingDomainSource; | ||
|
||
public final class PassageEditingDomainSource implements EditingDomainSource { | ||
|
||
@Override | ||
public EditingDomain create() { | ||
return new AdapterFactoryEditingDomain( | ||
new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE), // | ||
new BasicCommandStack(), // | ||
new HashMap<>()// | ||
); | ||
} | ||
|
||
} |