-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[2141] Double click on an element shall not expand and open properties
at the same time Bug: 2141 Change-Id: Ic4f58b2136016caf05093ff634dc75ef95a53fb8 Signed-off-by: Philippe DUL <philippe.dul@thalesgroup.com>
- Loading branch information
Showing
3 changed files
with
71 additions
and
15 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
.../org/polarsys/capella/core/platform/sirius/ui/navigator/actions/OpenPropertiesAction.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,45 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2018 THALES GLOBAL SERVICES. | ||
* 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: | ||
* Thales - initial API and implementation | ||
*******************************************************************************/ | ||
package org.polarsys.capella.core.platform.sirius.ui.navigator.actions; | ||
|
||
import org.eclipse.emf.ecore.EObject; | ||
import org.eclipse.jface.viewers.IStructuredSelection; | ||
import org.eclipse.ui.actions.BaseSelectionListenerAction; | ||
import org.polarsys.capella.core.model.handler.command.CapellaResourceHelper; | ||
import org.polarsys.capella.core.ui.properties.CapellaUIPropertiesPlugin; | ||
|
||
public class OpenPropertiesAction extends BaseSelectionListenerAction { | ||
|
||
public OpenPropertiesAction() { | ||
super("Open properties"); | ||
} | ||
|
||
@Override | ||
public void run() { | ||
IStructuredSelection selection = (IStructuredSelection) getStructuredSelection(); | ||
Object element = selection.getFirstElement(); | ||
|
||
if (CapellaResourceHelper.isSemanticElement(element)) { | ||
CapellaUIPropertiesPlugin.getDefault().openWizard((EObject) element); | ||
} | ||
} | ||
|
||
@Override | ||
protected boolean updateSelection(IStructuredSelection selection) { | ||
boolean result = false; | ||
|
||
if (!selection.isEmpty()) { | ||
result = (CapellaResourceHelper.isSemanticElements(selection.toList())) ? true : false; | ||
} | ||
|
||
return result; | ||
} | ||
} |
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