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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
af3
kernel
Commits
41f41be0
Commit
41f41be0
authored
Sep 23, 2013
by
Daniel Ratiu
Browse files
Options
Downloads
Patches
Plain Diff
tooltips about connecting elements are shown only 2 times
refs 1612
parent
e0c938f6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show 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
+15
-3
15 additions, 3 deletions
...org/fortiss/tooling/base/ui/editor/DiagramEditorBase.java
with
15 additions
and
3 deletions
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/editor/DiagramEditorBase.java
+
15
−
3
View file @
41f41be0
...
...
@@ -106,7 +106,7 @@ import org.fortiss.tooling.kernel.ui.service.IEditPartFactoryService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating
GREEN
Hash:
4F5E3DD53FCF647674A9830DABDE0593
* @ConQAT.Rating
YELLOW
Hash:
9E72ED3F824111F92720F85EF823E3DF
*/
public
class
DiagramEditorBase
<
T
extends
EObject
>
extends
GEFEditorBase
<
T
>
implements
IPostSelectionProvider
,
ContextMenuContextProvider
{
...
...
@@ -129,6 +129,15 @@ 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
()
{
@Override
...
...
@@ -136,10 +145,13 @@ public class DiagramEditorBase<T extends EObject> extends GEFEditorBase<T> imple
EditPart
ep
=
SelectionUtils
.
checkAndPickFirstSafe
(
selection
,
EditPart
.
class
);
if
(
ep
!=
null
)
{
Control
control
=
ep
.
getViewer
().
getControl
();
if
(
ep
.
getModel
()
instanceof
IConnector
)
{
if
(
ep
.
getModel
()
instanceof
IConnector
&&
connectorsSelectionCount
<
HINTS_COUNT
)
{
control
.
setToolTipText
(
"Link two connectors by pressing ALT and dragging from source to target."
);
}
else
if
(
ep
.
getModel
()
instanceof
IHierarchicElement
)
{
connectorsSelectionCount
++;
}
else
if
(
ep
.
getModel
()
instanceof
IHierarchicElement
&&
hierarchicElementssSelectionCount
<
HINTS_COUNT
)
{
control
.
setToolTipText
(
"Create a connection by pressing ALT and dragging."
);
hierarchicElementssSelectionCount
++;
}
}
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
sign in
to comment