Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.security.ui')
-rw-r--r--plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/AbstractDetailsPage.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/AbstractSectionPart.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/CDOSecurityFormEditor.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/CDOSecurityPage.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/RoleDetailsPage.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/TableSection.java88
-rw-r--r--plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/handlers/ManageSecurityHandler.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/messages/Messages.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/INewObjectConfigurator.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/OneToManyBlock.java150
-rw-r--r--plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/OneToManyTableBlock.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/ui/package-info.java13
12 files changed, 155 insertions, 158 deletions
diff --git a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/AbstractDetailsPage.java b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/AbstractDetailsPage.java
index c68b0398b2..8ace30fa22 100644
--- a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/AbstractDetailsPage.java
+++ b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/AbstractDetailsPage.java
@@ -61,7 +61,7 @@ import org.eclipse.ui.forms.widgets.TableWrapData;
*
* @author Christian W. Damus (CEA LIST)
*/
-public abstract class AbstractDetailsPage<T extends EObject> extends AbstractSectionPart<T> implements IDetailsPage
+public abstract class AbstractDetailsPage<T extends EObject> extends AbstractSectionPart<T>implements IDetailsPage
{
public AbstractDetailsPage(Class<T> elementType, EClass elementEClass, EditingDomain domain,
AdapterFactory adapterFactory)
@@ -104,8 +104,8 @@ public abstract class AbstractDetailsPage<T extends EObject> extends AbstractSec
protected Text text(Composite parent, FormToolkit toolkit, String label, EAttribute attribute)
{
toolkit.createLabel(parent, label);
- Text result = toolkit.createText(
- createDecorationComposite(parent, toolkit, layoutData(parent, SWT.FILL, false, 1)), ""); //$NON-NLS-1$
+ Text result = toolkit.createText(createDecorationComposite(parent, toolkit, layoutData(parent, SWT.FILL, false, 1)),
+ ""); //$NON-NLS-1$
getContext().bindValue(observeText(result),
EMFEditObservables.observeDetailValue(getRealm(), getEditingDomain(), getValue(), attribute));
getContext().bindValue(WidgetProperties.enabled().observe(result), getValue(), null,
@@ -293,8 +293,9 @@ public abstract class AbstractDetailsPage<T extends EObject> extends AbstractSec
protected ComboViewer combo(Composite parent, FormToolkit toolkit, String label, EAttribute attribute)
{
toolkit.createLabel(parent, label);
- ComboViewer result = new ComboViewer(createDecorationComposite(parent, toolkit,
- layoutData(parent, SWT.LEFT, false, 1)), SWT.READ_ONLY | SWT.DROP_DOWN);
+ ComboViewer result = new ComboViewer(
+ createDecorationComposite(parent, toolkit, layoutData(parent, SWT.LEFT, false, 1)),
+ SWT.READ_ONLY | SWT.DROP_DOWN);
result.setLabelProvider(new AdapterFactoryLabelProvider(getAdapterFactory()));
result.setContentProvider(new ArrayContentProvider());
result.setInput(attribute.getEAttributeType().getInstanceClass().getEnumConstants());
@@ -327,8 +328,8 @@ public abstract class AbstractDetailsPage<T extends EObject> extends AbstractSec
final ControlDecoration decoration = new ControlDecoration(control, SWT.RIGHT | SWT.CENTER);
decoration.hide();
decoration.setDescriptionText(Messages.AbstractDetailsPage_3);
- decoration.setImage(ExtendedImageRegistry.getInstance().getImage(
- URI.createPlatformPluginURI(OM.BUNDLE_ID + "/icons/full/elcl16/revert.gif", true))); //$NON-NLS-1$
+ decoration.setImage(ExtendedImageRegistry.getInstance()
+ .getImage(URI.createPlatformPluginURI(OM.BUNDLE_ID + "/icons/full/elcl16/revert.gif", true))); //$NON-NLS-1$
decoration.setMarginWidth(2);
decoration.addSelectionListener(new SelectionAdapter()
diff --git a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/AbstractSectionPart.java b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/AbstractSectionPart.java
index 67b14889de..9aaf0a45f6 100644
--- a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/AbstractSectionPart.java
+++ b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/AbstractSectionPart.java
@@ -62,7 +62,8 @@ public abstract class AbstractSectionPart<T extends EObject> extends AbstractFor
private IActionBars editorActionBars;
- public AbstractSectionPart(Class<T> inputType, EClass inputEClass, EditingDomain domain, AdapterFactory adapterFactory)
+ public AbstractSectionPart(Class<T> inputType, EClass inputEClass, EditingDomain domain,
+ AdapterFactory adapterFactory)
{
this.inputType = inputType;
this.inputEClass = inputEClass;
diff --git a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/CDOSecurityFormEditor.java b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/CDOSecurityFormEditor.java
index ac63369910..428c5528f7 100644
--- a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/CDOSecurityFormEditor.java
+++ b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/CDOSecurityFormEditor.java
@@ -108,8 +108,8 @@ public class CDOSecurityFormEditor extends FormEditor implements IEditingDomainP
}
catch (CommitException e)
{
- StatusAdapter status = new StatusAdapter(new Status(IStatus.ERROR, OM.BUNDLE_ID,
- Messages.CDOSecurityFormEditor_0, e));
+ StatusAdapter status = new StatusAdapter(
+ new Status(IStatus.ERROR, OM.BUNDLE_ID, Messages.CDOSecurityFormEditor_0, e));
status.setProperty(IStatusAdapterConstants.TITLE_PROPERTY, Messages.CDOSecurityFormEditor_1);
status.setProperty(IStatusAdapterConstants.TIMESTAMP_PROPERTY, System.currentTimeMillis());
StatusManager.getManager().handle(status, StatusManager.SHOW);
diff --git a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/CDOSecurityPage.java b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/CDOSecurityPage.java
index ce524fa457..669f392886 100644
--- a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/CDOSecurityPage.java
+++ b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/CDOSecurityPage.java
@@ -337,16 +337,16 @@ public class CDOSecurityPage extends FormPage
private IAction createEditAdvancedAction()
{
- return new Action(Messages.CDOSecurityPage_0, ExtendedImageRegistry.getInstance().getImageDescriptor(
- URI.createPlatformPluginURI(OM.BUNDLE_ID + "/icons/full/elcl16/advanced.gif", true))) //$NON-NLS-1$
- {
+ return new Action(Messages.CDOSecurityPage_0, ExtendedImageRegistry.getInstance()
+ .getImageDescriptor(URI.createPlatformPluginURI(OM.BUNDLE_ID + "/icons/full/elcl16/advanced.gif", true))) //$NON-NLS-1$
+ {
@Override
public void run()
{
try
{
- IEditorInput newEditorInput = CDOEditorUtil.createCDOEditorInputWithEditingDomain(
- (CDOEditorInput)getEditorInput(), getEditingDomain());
+ IEditorInput newEditorInput = CDOEditorUtil
+ .createCDOEditorInputWithEditingDomain((CDOEditorInput)getEditorInput(), getEditingDomain());
getSite().getPage().openEditor(newEditorInput, CDOEditorUtil.getEditorID(), true,
IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID);
}
@@ -355,6 +355,6 @@ public class CDOSecurityPage extends FormPage
OM.LOG.error(e);
}
}
- };
+ };
}
}
diff --git a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/RoleDetailsPage.java b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/RoleDetailsPage.java
index 7d10558023..d7b2f38018 100644
--- a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/RoleDetailsPage.java
+++ b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/RoleDetailsPage.java
@@ -98,8 +98,9 @@ public class RoleDetailsPage extends AbstractDetailsPage<Role>
public Command createConfigureCommand(Object newObject)
{
ResourceFilter filter = SecurityFactory.eINSTANCE.createResourceFilter("/home/${user}", PatternStyle.TREE); //$NON-NLS-1$
- Command result = CreateChildCommand.create(getEditingDomain(), newObject, new CommandParameter(newObject,
- SecurityPackage.Literals.FILTER_PERMISSION__FILTERS, filter), Collections.singleton(newObject));
+ Command result = CreateChildCommand.create(getEditingDomain(), newObject,
+ new CommandParameter(newObject, SecurityPackage.Literals.FILTER_PERMISSION__FILTERS, filter),
+ Collections.singleton(newObject));
result = result.chain(SetCommand.create(getEditingDomain(), newObject,
SecurityPackage.Literals.PERMISSION__ACCESS, Access.WRITE));
return result;
@@ -245,8 +246,8 @@ public class RoleDetailsPage extends AbstractDetailsPage<Role>
case COL_PATH:
if (!ObjectUtil.equals(filter.getPath(), value))
{
- execute(SetCommand
- .create(getEditingDomain(), filter, SecurityPackage.Literals.RESOURCE_FILTER__PATH, value));
+ execute(
+ SetCommand.create(getEditingDomain(), filter, SecurityPackage.Literals.RESOURCE_FILTER__PATH, value));
viewer.refresh(element);
}
break;
diff --git a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/TableSection.java b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/TableSection.java
index 382db35f29..b2aa0eae9e 100644
--- a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/TableSection.java
+++ b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/editor/TableSection.java
@@ -237,7 +237,7 @@ public abstract class TableSection<T extends EObject> extends AbstractSectionPar
Command dummy = createDeleteCommand(EcoreUtil.create(elementEClass));
return new SelectionListenerAction<EObject>(dummy.getLabel(), SharedIcons.getDescriptor("etool16/delete.gif")) //$NON-NLS-1$
- {
+ {
@Override
public void run()
{
@@ -259,7 +259,7 @@ public abstract class TableSection<T extends EObject> extends AbstractSectionPar
{
return EObject.class;
}
- };
+ };
}
protected Command createDeleteCommand(EObject toDelete)
@@ -291,59 +291,59 @@ public abstract class TableSection<T extends EObject> extends AbstractSectionPar
{
viewer.addDropSupport(DND.DROP_LINK | DND.DROP_MOVE | DND.DROP_COPY,
new Transfer[] { LocalSelectionTransfer.getTransfer() }, new ViewerDropAdapter(viewer)
- {
- {
- // We don't want it to look like you can insert new elements, only drop onto existing elements
- setFeedbackEnabled(false);
- }
+ {
+ {
+ // We don't want it to look like you can insert new elements, only drop onto existing elements
+ setFeedbackEnabled(false);
+ }
+
+ @Override
+ public boolean validateDrop(Object target, int operation, TransferData transferType)
+ {
+ boolean result = false;
- @Override
- public boolean validateDrop(Object target, int operation, TransferData transferType)
+ if (target instanceof EObject && LocalSelectionTransfer.getTransfer().isSupportedType(transferType))
+ {
+ EObject objectToDrop = getObjectToDrop(transferType);
+ if (objectToDrop != null)
{
- boolean result = false;
+ result = getDropReference((EObject)target, objectToDrop) != null;
- if (target instanceof EObject && LocalSelectionTransfer.getTransfer().isSupportedType(transferType))
+ if (result && (getCurrentEvent().operations | DND.DROP_COPY) != 0)
{
- EObject objectToDrop = getObjectToDrop(transferType);
- if (objectToDrop != null)
- {
- result = getDropReference((EObject)target, objectToDrop) != null;
-
- if (result && (getCurrentEvent().operations | DND.DROP_COPY) != 0)
- {
- overrideOperation(DND.DROP_COPY);
- }
- }
+ overrideOperation(DND.DROP_COPY);
}
-
- return result;
}
+ }
- @Override
- public boolean performDrop(Object data)
- {
- IStructuredSelection selection = (IStructuredSelection)data;
- EObject objectToDrop = UIUtil.getElement(selection, EObject.class);
- EObject target = (EObject)getCurrentTarget();
+ return result;
+ }
- Command command = AddCommand.create(getEditingDomain(), target, getDropReference(target, objectToDrop),
- selection.toList());
+ @Override
+ public boolean performDrop(Object data)
+ {
+ IStructuredSelection selection = (IStructuredSelection)data;
+ EObject objectToDrop = UIUtil.getElement(selection, EObject.class);
+ EObject target = (EObject)getCurrentTarget();
- boolean result = execute(command);
- if (result)
- {
- viewer.getControl().setFocus();
- viewer.setSelection(new StructuredSelection(target));
- }
+ Command command = AddCommand.create(getEditingDomain(), target, getDropReference(target, objectToDrop),
+ selection.toList());
- return result;
- }
+ boolean result = execute(command);
+ if (result)
+ {
+ viewer.getControl().setFocus();
+ viewer.setSelection(new StructuredSelection(target));
+ }
- private EObject getObjectToDrop(TransferData transferType)
- {
- return UIUtil.getElement(LocalSelectionTransfer.getTransfer().getSelection(), EObject.class);
- }
- });
+ return result;
+ }
+
+ private EObject getObjectToDrop(TransferData transferType)
+ {
+ return UIUtil.getElement(LocalSelectionTransfer.getTransfer().getSelection(), EObject.class);
+ }
+ });
}
protected EReference getDropReference(EObject target, EObject objectToDrop)
diff --git a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/handlers/ManageSecurityHandler.java b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/handlers/ManageSecurityHandler.java
index ae88b5830c..7c3d69c6f6 100644
--- a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/handlers/ManageSecurityHandler.java
+++ b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/handlers/ManageSecurityHandler.java
@@ -368,8 +368,8 @@ public class ManageSecurityHandler extends LongRunningHandler
IManagedContainer container = IPluginContainer.INSTANCE;
String productGroup = CredentialsProviderFactory.PRODUCT_GROUP;
String factoryType = "interactive"; //$NON-NLS-1$
- IPasswordCredentialsProvider credentialsProvider = (IPasswordCredentialsProvider)container.getElement(
- productGroup, factoryType, null);
+ IPasswordCredentialsProvider credentialsProvider = (IPasswordCredentialsProvider)container
+ .getElement(productGroup, factoryType, null);
if (credentialsProvider == null)
{
diff --git a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/messages/Messages.java b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/messages/Messages.java
index f73dafbe72..e0401ce494 100644
--- a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/messages/Messages.java
+++ b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/messages/Messages.java
@@ -4,7 +4,7 @@
* 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:
* Christian W. Damus (CEA LIST) - initial API and implementation
*/
@@ -14,7 +14,7 @@ import org.eclipse.osgi.util.NLS;
/**
* Localized messages bundle.
- *
+ *
* @author Christian W. Damus (CEA LIST)
*/
public class Messages extends NLS
@@ -112,6 +112,7 @@ public class Messages extends NLS
public static String UserDetailsPage_9;
public static String UsersSection_0;
+
static
{
// Initialize resource bundle
diff --git a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/INewObjectConfigurator.java b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/INewObjectConfigurator.java
index f757c7e0f1..5a5210d88d 100644
--- a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/INewObjectConfigurator.java
+++ b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/INewObjectConfigurator.java
@@ -4,7 +4,7 @@
* 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:
* Christian W. Damus (CEA LIST) - initial API and implementation
*/
@@ -14,7 +14,7 @@ import org.eclipse.emf.common.command.Command;
/**
* A protocol for the configuration of newly created elements in the editor.
- *
+ *
* @author Christian W. Damus (CEA LIST)
*/
public interface INewObjectConfigurator
diff --git a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/OneToManyBlock.java b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/OneToManyBlock.java
index 391b71a479..a9658cfdc5 100644
--- a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/OneToManyBlock.java
+++ b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/OneToManyBlock.java
@@ -312,12 +312,12 @@ public class OneToManyBlock
available.removeAll(value);
SecurityUIUtil.applySupportedElementFilter(available, itemType);
- String label = NLS.bind(Messages.OneToManyBlock_3, SecurityEditPlugin.INSTANCE.getString(String.format(
- "_UI_%s_%s_feature", reference.getEContainingClass().getName(), reference.getName()))); //$NON-NLS-1$
+ String label = NLS.bind(Messages.OneToManyBlock_3, SecurityEditPlugin.INSTANCE.getString(
+ String.format("_UI_%s_%s_feature", reference.getEContainingClass().getName(), reference.getName()))); //$NON-NLS-1$
- FeatureEditorDialog dlg = new FeatureEditorDialog(viewer.getControl().getShell(), new TableLabelProvider(
- adapterFactory), input.getValue(), reference.getEContainingClass(), Collections.EMPTY_LIST, label,
- available, false, true, true);
+ FeatureEditorDialog dlg = new FeatureEditorDialog(viewer.getControl().getShell(),
+ new TableLabelProvider(adapterFactory), input.getValue(), reference.getEContainingClass(),
+ Collections.EMPTY_LIST, label, available, false, true, true);
if (dlg.open() == Window.OK && !dlg.getResult().isEmpty())
{
@@ -335,7 +335,7 @@ public class OneToManyBlock
final SelectionListenerAction<EObject> removeAction = new SelectionListenerAction<EObject>(
Messages.OneToManyBlock_2, SharedIcons.getDescriptor("etool16/delete.gif")) //$NON-NLS-1$
- {
+ {
@Override
public void run()
{
@@ -368,23 +368,23 @@ public class OneToManyBlock
{
return EObject.class;
}
- };
+ };
- removeButton.addSelectionListener(new SelectionAdapter()
+ removeButton.addSelectionListener(new SelectionAdapter()
+ {
+ @Override
+ public void widgetSelected(SelectionEvent e)
+ {
+ if (removeAction.isEnabled())
{
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- if (removeAction.isEnabled())
- {
- removeAction.run();
- }
- }
- });
+ removeAction.run();
+ }
+ }
+ });
- viewer.addSelectionChangedListener(removeAction);
+ viewer.addSelectionChangedListener(removeAction);
- new ActionBarsHelper(editorActionBars).addGlobalAction(ActionFactory.DELETE.getId(), removeAction).install(viewer);
+ new ActionBarsHelper(editorActionBars).addGlobalAction(ActionFactory.DELETE.getId(), removeAction).install(viewer);
}
public void setInput(IObservableValue input)
@@ -404,8 +404,8 @@ public class OneToManyBlock
value.dispose();
}
- value = EMFEditObservables.observeDetailList(context.getValidationRealm(), domain, input, getConfiguration()
- .getModelReference());
+ value = EMFEditObservables.observeDetailList(context.getValidationRealm(), domain, input,
+ getConfiguration().getModelReference());
if (viewer != null)
{
@@ -479,64 +479,64 @@ public class OneToManyBlock
{
viewer.addDropSupport(DND.DROP_LINK | DND.DROP_MOVE | DND.DROP_COPY,
new Transfer[] { LocalSelectionTransfer.getTransfer() }, new DropTargetAdapter()
- {
- @Override
- public void dragEnter(DropTargetEvent event)
- {
- if (!canDrop(event))
- {
- // Reject this drop
- event.detail = DND.DROP_NONE;
- }
- else if ((event.operations | DND.DROP_COPY) != 0)
{
- event.detail = DND.DROP_COPY;
- }
- }
+ @Override
+ public void dragEnter(DropTargetEvent event)
+ {
+ if (!canDrop(event))
+ {
+ // Reject this drop
+ event.detail = DND.DROP_NONE;
+ }
+ else if ((event.operations | DND.DROP_COPY) != 0)
+ {
+ event.detail = DND.DROP_COPY;
+ }
+ }
- private boolean canDrop(DropTargetEvent event)
- {
- boolean result = false;
+ private boolean canDrop(DropTargetEvent event)
+ {
+ boolean result = false;
- if (LocalSelectionTransfer.getTransfer().isSupportedType(event.currentDataType))
- {
- result = canPresentAll(LocalSelectionTransfer.getTransfer().getSelection());
- }
+ if (LocalSelectionTransfer.getTransfer().isSupportedType(event.currentDataType))
+ {
+ result = canPresentAll(LocalSelectionTransfer.getTransfer().getSelection());
+ }
- return result;
- }
+ return result;
+ }
- @Override
- public void dropAccept(DropTargetEvent event)
- {
- if (!canDrop(event))
- {
- // Reject this drop
- event.detail = DND.DROP_NONE;
- }
- else if ((event.operations | DND.DROP_COPY) != 0)
- {
- event.detail = DND.DROP_COPY;
- }
- }
+ @Override
+ public void dropAccept(DropTargetEvent event)
+ {
+ if (!canDrop(event))
+ {
+ // Reject this drop
+ event.detail = DND.DROP_NONE;
+ }
+ else if ((event.operations | DND.DROP_COPY) != 0)
+ {
+ event.detail = DND.DROP_COPY;
+ }
+ }
- @Override
- public void drop(DropTargetEvent event)
- {
- if (canDrop(event))
- {
- IStructuredSelection selection = (IStructuredSelection)LocalSelectionTransfer.getTransfer()
- .getSelection();
- Command command = AddCommand.create(domain, input.getValue(), getConfiguration().getModelReference(),
- selection.toList());
- if (execute(command))
+ @Override
+ public void drop(DropTargetEvent event)
{
- viewer.setSelection(selection);
- viewer.getControl().setFocus();
+ if (canDrop(event))
+ {
+ IStructuredSelection selection = (IStructuredSelection)LocalSelectionTransfer.getTransfer()
+ .getSelection();
+ Command command = AddCommand.create(domain, input.getValue(), getConfiguration().getModelReference(),
+ selection.toList());
+ if (execute(command))
+ {
+ viewer.setSelection(selection);
+ viewer.getControl().setFocus();
+ }
+ }
}
- }
- }
- });
+ });
}
protected void hookUnsupportedModelContentValidation(IObservableList observableList)
@@ -565,8 +565,8 @@ public class OneToManyBlock
{
if (!supportedContentFilter.select(element))
{
- configuration.getManagedForm().getMessageManager()
- .addMessage(this, Messages.TableSection_3, null, IStatus.WARNING, viewer.getControl());
+ configuration.getManagedForm().getMessageManager().addMessage(this, Messages.TableSection_3, null,
+ IStatus.WARNING, viewer.getControl());
return;
}
}
@@ -607,8 +607,8 @@ public class OneToManyBlock
public OneToManyConfiguration(IManagedForm managedForm, EReference reference)
{
- this(managedForm, reference, reference.getEReferenceType(), SecurityUIUtil.getSupportedElementFilter(reference
- .getEReferenceType()));
+ this(managedForm, reference, reference.getEReferenceType(),
+ SecurityUIUtil.getSupportedElementFilter(reference.getEReferenceType()));
}
public OneToManyConfiguration(IManagedForm managedForm, EReference reference, EClass itemType)
diff --git a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/OneToManyTableBlock.java b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/OneToManyTableBlock.java
index 23426d79c7..28f829f48f 100644
--- a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/OneToManyTableBlock.java
+++ b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/internal/ui/util/OneToManyTableBlock.java
@@ -70,10 +70,8 @@ public class OneToManyTableBlock extends OneToManyBlock
{
TableViewerColumn column = new TableViewerColumn(viewer, SWT.LEFT);
column.getColumn().setText(columnTitles[i]);
- layout.setColumnData(
- column.getColumn(),
- new ColumnWeightData(tableConfig.getColumnWeight(i), tableConfig.getColumnMinimumSize(i), tableConfig
- .isColumnResizable(i)));
+ layout.setColumnData(column.getColumn(), new ColumnWeightData(tableConfig.getColumnWeight(i),
+ tableConfig.getColumnMinimumSize(i), tableConfig.isColumnResizable(i)));
final int columnIndex = i;
diff --git a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/ui/package-info.java b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/ui/package-info.java
index 71d1c97d8e..29c980376e 100644
--- a/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/ui/package-info.java
+++ b/plugins/org.eclipse.emf.cdo.security.ui/src/org/eclipse/emf/cdo/security/ui/package-info.java
@@ -1,16 +1,11 @@
/*
- * Copyright (c) 2013 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
+ * Copyright (c) 2013 Eike Stepper (Berlin, Germany) 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: Eike Stepper - initial API and
+ * implementation
*/
/**
* Concepts and default implementations for the CDO security user interface.
*/
package org.eclipse.emf.cdo.security.ui;
-

Back to the top