Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
af3
kernel
Commits
b15facfd
Commit
b15facfd
authored
11 years ago
by
Vincent Aravantinos
Browse files
Options
Downloads
Patches
Plain Diff
bugfix
refs 1612
parent
3a5beaff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/editor/DiagramEditorBase.java
+13
-14
13 additions, 14 deletions
...org/fortiss/tooling/base/ui/editor/DiagramEditorBase.java
with
13 additions
and
14 deletions
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/editor/DiagramEditorBase.java
+
13
−
14
View file @
b15facfd
...
...
@@ -106,7 +106,7 @@ import org.fortiss.tooling.kernel.ui.service.IEditPartFactoryService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash:
9E72ED3F824111F92720F85EF823E3DF
* @ConQAT.Rating YELLOW Hash:
C4D39F316D63A63B989D0D26178C9793
*/
public
class
DiagramEditorBase
<
T
extends
EObject
>
extends
GEFEditorBase
<
T
>
implements
IPostSelectionProvider
,
ContextMenuContextProvider
{
...
...
@@ -129,29 +129,28 @@ public class DiagramEditorBase<T extends EObject> extends GEFEditorBase<T> imple
/** A container for editor actions */
private
final
ActionRegistry
actionRegistry
=
new
ActionRegistry
();
/** A counter for the selection of connectors. */
private
int
connectorsSelectionCount
;
/** A counter for the selection of hierarchic elements. */
private
int
hierarchicElementssSelectionCount
;
/** The number of times the hints about creating connections should be displayed. */
private
static
final
int
HINTS_COUNT
=
2
;
/** Selection listener used to update selection actions. */
private
final
ISelectionListener
selectionListener
=
new
ISelectionListener
()
{
/** A counter for the selection. */
private
int
selectionCount
=
0
;
/** The number of times the hints about creating connections should be displayed. */
private
final
int
HINTS_COUNT
=
4
;
@Override
public
void
selectionChanged
(
IWorkbenchPart
part
,
ISelection
selection
)
{
EditPart
ep
=
SelectionUtils
.
checkAndPickFirstSafe
(
selection
,
EditPart
.
class
);
if
(
ep
!=
null
)
{
Control
control
=
ep
.
getViewer
().
getControl
();
if
(
ep
.
getModel
()
instanceof
IConnector
&&
connectorsS
electionCount
<
HINTS_COUNT
)
{
if
(
ep
.
getModel
()
instanceof
IConnector
&&
s
electionCount
<
HINTS_COUNT
)
{
control
.
setToolTipText
(
"Link two connectors by pressing ALT and dragging from source to target."
);
connectorsS
electionCount
++;
s
electionCount
++;
}
else
if
(
ep
.
getModel
()
instanceof
IHierarchicElement
&&
hierarchicElementssS
electionCount
<
HINTS_COUNT
)
{
s
electionCount
<
HINTS_COUNT
)
{
control
.
setToolTipText
(
"Create a connection by pressing ALT and dragging."
);
hierarchicElementssSelectionCount
++;
selectionCount
++;
}
else
{
control
.
setToolTipText
(
""
);
}
}
updateActions
(
selectionActions
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment