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
4c8df6dc
Commit
4c8df6dc
authored
Jun 28, 2016
by
Florian Hölzl
Browse files
Options
Downloads
Patches
Plain Diff
Library view listenes to tutorial step changes and updates its viewer with the active editor part.
refs 2583
parent
e9ba8421
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.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/LibraryView.java
+33
-1
33 additions, 1 deletion
...fortiss/tooling/kernel/ui/internal/views/LibraryView.java
with
33 additions
and
1 deletion
org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/LibraryView.java
+
33
−
1
View file @
4c8df6dc
...
...
@@ -17,6 +17,7 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
+--------------------------------------------------------------------------*/
package
org.fortiss.tooling.kernel.ui.internal.views
;
import
static
org
.
eclipse
.
ui
.
PlatformUI
.
getWorkbench
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
utils
.
EcoreUtils
.
filterOutInstanceOf
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
utils
.
KernelModelElementUtils
.
getParentElement
;
...
...
@@ -41,11 +42,15 @@ import org.eclipse.ui.IWorkbenchPart;
import
org.eclipse.ui.dialogs.FilteredTree
;
import
org.eclipse.ui.dialogs.PatternFilter
;
import
org.eclipse.ui.part.ViewPart
;
import
org.fortiss.tooling.kernel.extension.ITutorialProvider
;
import
org.fortiss.tooling.kernel.extension.data.LibraryPrototype
;
import
org.fortiss.tooling.kernel.extension.data.Prototype
;
import
org.fortiss.tooling.kernel.extension.data.PrototypeCategory
;
import
org.fortiss.tooling.kernel.extension.data.TutorialAtomicStep
;
import
org.fortiss.tooling.kernel.model.ILibraryElement
;
import
org.fortiss.tooling.kernel.service.IPrototypeService
;
import
org.fortiss.tooling.kernel.service.ITutorialService
;
import
org.fortiss.tooling.kernel.service.listener.ITutorialServiceListener
;
import
org.fortiss.tooling.kernel.ui.extension.IModelElementHandler
;
import
org.fortiss.tooling.kernel.ui.extension.base.EditorBase
;
import
org.fortiss.tooling.kernel.ui.internal.editor.ExtendableMultiPageEditor
;
...
...
@@ -61,7 +66,7 @@ import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
* @version $Rev: 18709 $
* @ConQAT.Rating GREEN Hash: B61C004066AC92C581BB6128CCF8FD22
*/
public
class
LibraryView
extends
ViewPart
{
public
class
LibraryView
extends
ViewPart
implements
ITutorialServiceListener
{
/** The viewer. */
private
TreeViewer
viewer
;
...
...
@@ -112,6 +117,15 @@ public class LibraryView extends ViewPart {
getViewSite
().
setSelectionProvider
(
viewer
);
getSite
().
getWorkbenchWindow
().
getPartService
().
addPartListener
(
editorActivationListener
);
ITutorialService
.
getInstance
().
addTutorialServiceListener
(
this
);
}
/** Switches to the active workbench editor part. */
private
void
switchWorkbenchEditor
()
{
IEditorPart
part
=
getWorkbench
().
getActiveWorkbenchWindow
().
getActivePage
().
getActiveEditor
();
switchWorkbenchEditor
(
part
);
}
/** Switches to the given workbench editor part. */
...
...
@@ -273,4 +287,22 @@ public class LibraryView extends ViewPart {
switchWorkbenchEditor
(
part
);
}
}
/** {@inheritDoc} */
@Override
public
void
tutorialStarted
(
ITutorialProvider
provider
)
{
// nothing to do
}
/** {@inheritDoc} */
@Override
public
void
tutorialStepChanged
(
TutorialAtomicStep
step
)
{
switchWorkbenchEditor
();
}
/** {@inheritDoc} */
@Override
public
void
tutorialStopped
(
ITutorialProvider
provider
)
{
// nothing to do
}
}
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