Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
<!DOCTYPE HTML><html lang="en">
<HEAD>

<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<meta charset="utf-8">
<TITLE>
Plugging into the workbench
</TITLE>
Expand All @@ -32,7 +29,7 @@ <h2>
<P >
When you open your workbench on a set of projects, it looks something like this.</P>

<p align="left"><img src="images/workbench.png" alt="Workbench with navigator view, editor, outliner, and task list" border="0" ></p>
<p><img src="images/workbench.png" alt="Workbench with navigator view, editor, outliner, and task list"></p>
<P >
The workbench is just a frame that can present various visual parts. These parts fall into two major categories:
<b> views</b> and <b>editors</b>.</P>
Expand All @@ -56,21 +53,17 @@ <h3>
or view something of interest. For example, the project explorer lets the user
navigate the workspace and select resources.</P>

<img src="images/navigator.png" alt="" border="0">


<img src="images/navigator.png" alt="">

<h3>
Editors</h3>
<P >
Editors allow the user to open, edit, and save objects.
The workbench provides a standard editor for text resources.</P>

<img src="images/texteditor.png" alt="" border="0">
<img src="images/texteditor.png" alt="">
<P >
Additional editors, such as Java code editors or HTML editors, can be supplied by plug-ins</P>



</BODY>
</HTML>
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE HTML>

<html lang="en">
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page. Portions contributed by Jan-Hendrik Diederich (bug 228956).">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript">
<meta charset="utf-8">
<script src="PLUGINS_ROOT/org.eclipse.help/livehelp.js">
</script>

<title>Activities</title>

<link rel="stylesheet" type="text/css" href="../book.css">
<style>
.keyword {
color:#7f0055;
font-weight: bold;
}
.string {
color:#2a00ff;
}
.comment {
color:#008000;
}
.value {
color:#990000;
}
</style>
</head>

<body bgcolor="#ffffff">
<body>
<h3>Activities</h3>An <b>activity</b> is a logical grouping of functionality that
is centered around a certain kind of task. For example, developing Java
software is an activity commonly performed by users of the platform, and the
Expand Down Expand Up @@ -177,15 +190,15 @@ <h4>Binding Activities to UI Contributions</h4>Activities can be associated

plug-in-identifier + "/" + local-identifier
</pre>For example, the following activity pattern binding states that a UI
contribution from any JDT plug-in id (<tt>org.eclipse.jdt.*</tt>) is associated
contribution from any JDT plug-in id (<code>org.eclipse.jdt.*</code>) is associated
with the Java development activity regardless of its local identifier
(<tt>.*</tt>).
(<code>.*</code>).
<pre>&lt;activityPatternBinding
activityId="org.eclipse.javaDevelopment"
pattern="org\.eclipse\.jdt\..*/.*"&gt;
&lt;/activityPatternBinding&gt;
</pre>The next binding is more specific. It states that the contribution named
<tt>javanature</tt> defined in the JDT core (<tt>org.eclipse.jdt.core</tt>) is
<code>javanature</code> defined in the JDT core (<code>org.eclipse.jdt.core</code>) is
associated with the Java development activity.
<pre>&lt;activityPatternBinding
activityId="org.eclipse.javaDevelopment"
Expand All @@ -196,14 +209,14 @@ <h4>Binding Activities to UI Contributions</h4>Activities can be associated

It is also possible to refer to a single UI contribution using its id without having to
use regular expression syntax if the attribute
<tt>isEqualityPattern</tt> is set to <tt>true</tt>.<br>
<code>isEqualityPattern</code> is set to <code>true</code>.<br>
The following XML shows the previous example with the
<tt>isEqualityPattern</tt> set to <tt>true</tt>.<br>
<code>isEqualityPattern</code> set to <code>true</code>.<br>

<tt><br>
<code><br>
&lt;activityPatternBinding<br>&nbsp; activityId="org.eclipse.javaDevelopment"<br>&nbsp; pattern="org.eclipse.jdt.core/javanature"<br>&nbsp; isEqualityPattern="true"&gt;<br>
&lt;/activityPatternBinding&gt;<br>
<br></tt>As you can see, activity pattern bindings can be used to associate
<br></code>As you can see, activity pattern bindings can be used to associate
large groups of contributions with a particular activity, or to associate
very specific contributions with an activity. The following contributions are
affected by activities:
Expand Down Expand Up @@ -314,70 +327,69 @@ <h4>Using Expression-based Activities</h4>
To filter a UI element using an expression-based activity, create an activity like the
following:<br>

<tt>&lt;activity <br>&nbsp;id="forbiddenViewActivityId" name="Forbidden View Activity"&gt;<br>&nbsp;&nbsp;&lt;enabledWhen&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;with variable="rightsVariable"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<code>&lt;activity <br>&nbsp;id="forbiddenViewActivityId" name="Forbidden View Activity"&gt;<br>&nbsp;&nbsp;&lt;enabledWhen&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;with variable="rightsVariable"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;iterate ifEmpty="false" operator="or"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
&lt;equals value="grantShowForbidden" /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;/iterate&gt;<br>&nbsp;&nbsp;&nbsp;
&lt;/with&gt;<br>
&nbsp;&nbsp;&lt;/enabledWhen&gt;<br>
&lt;/activity&gt;
</tt><br><br>
</code><br><br>

Then, bind this activity to a UI element, for example a view:<br>
<tt>&lt;activityPatternBinding <br>&nbsp;activityId="forbiddenViewActivityId" <br><br>&nbsp;<font color="green">&lt;!-- Switches the interpretation of the pattern
as regular expression off --&gt;</font> <br>&nbsp;isEqualityPattern="true" <br>&nbsp;pattern="DemoRCP/demorcp.views.ForbiddenView"&gt; <br>
<code>&lt;activityPatternBinding <br>&nbsp;activityId="forbiddenViewActivityId" <br><br>&nbsp;<span style="color:green">&lt;!-- Switches the interpretation of the pattern
as regular expression off --&gt;</span> <br>&nbsp;isEqualityPattern="true" <br>&nbsp;pattern="DemoRCP/demorcp.views.ForbiddenView"&gt; <br>
&lt;/activityPatternBinding&gt;
</tt>
</code>

<p>The following code snippets show how to control the variable "rightsVariable"
that appears in the activity's "enabledWhen" expression. New variables can be added
through the <b>org.eclipse.ui.services</b> extension point as subclasses of
<b>AbstractSourceProvider</b>.
</p>

<p align="left">
<tt>
<p>
<code>
<font color="#7f0055"><b>import&nbsp;</b></font><font color="#000000">java.util.HashMap;<br>...</font><br>
<font color="#7f0055"><b>import&nbsp;</b></font><font color="#000000">org.eclipse.ui.AbstractSourceProvider;</font><br>
<span class="keyword">import </span>java.util.HashMap;<br>...<br>
<span class="keyword">import </span>org.eclipse.ui.AbstractSourceProvider;<br>

<font color="#7f0055"><b>import&nbsp;</b></font><font color="#000000">org.eclipse.ui.PlatformUI;</font><br>
<font color="#7f0055"><b>import&nbsp;</b></font><font color="#000000">org.eclipse.ui.handlers.IHandlerService;</font><br>
<font color="#7f0055"><b>import&nbsp;</b></font><font color="#000000">org.eclipse.ui.services.IEvaluationService;</font><br>
<span class="keyword">import </span>org.eclipse.ui.PlatformUI;<br>
<span class="keyword">import </span>org.eclipse.ui.handlers.IHandlerService;<br>
<span class="keyword">import </span>org.eclipse.ui.services.IEvaluationService;<br>
<br>
<font color="#7f0055"><b>public&nbsp;class&nbsp;</b></font><font color="#000000">RightsSourceProvider&nbsp;</font><font color="#7f0055"><b>extends&nbsp;</b></font><font color="#000000">AbstractSourceProvider&nbsp;</font><font color="#000000">{</font><br>
<span class="keyword">public class </span>RightsSourceProvider&nbsp;<span class="keyword">extends </span>AbstractSourceProvider&nbsp;{<br>

<br>
<font color="#ffffff">&nbsp;&nbsp;</font><font color="#7f0055"><b>public&nbsp;final&nbsp;static&nbsp;</b></font><font color="#000000">String&nbsp;RIGHT_FORBIDDEN&nbsp;=&nbsp;<font color="#2a00ff">"grantShowForbidden"</font><font color="#000000">;</font></font><br>
&nbsp;&nbsp;<span class="keyword">public final static </span>String&nbsp;RIGHT_FORBIDDEN&nbsp;=&nbsp;<span class="string">"grantShowForbidden"</span>;<br>
<br>
<font color="#ffffff">&nbsp;&nbsp;</font><font color="#7f0055"><b>public&nbsp;final&nbsp;static&nbsp;</b></font><font color="#000000">String&nbsp;RIGHTS_VARIABLE&nbsp;=&nbsp;</font><font color="#2a00ff">"rightsVariable"</font><font color="#000000">;</font><br>
&nbsp;&nbsp;<span class="keyword">public final static </span>String&nbsp;RIGHTS_VARIABLE&nbsp;=&nbsp;<span class="string">"rightsVariable"</span>;<br>

<font color="#ffffff">&nbsp;&nbsp;</font><font color="#7f0055"><b>private&nbsp;final&nbsp;static&nbsp;</b></font><font color="#000000">String</font><font color="#000000">[]&nbsp;</font><font color="#000000">PROVIDED_SOURCE_NAMES&nbsp;=&nbsp;</font><font color="#7f0055"><b>new&nbsp;</b></font><font color="#000000">String</font><font color="#000000">[]&nbsp;{&nbsp;</font><font color="#000000">RIGHTS_VARIABLE&nbsp;</font><font color="#000000">}</font><font color="#000000">;</font><br>
&nbsp;&nbsp;<span class="keyword">private final static </span>String[]&nbsp;PROVIDED_SOURCE_NAMES&nbsp;=&nbsp;<span class="keyword">new </span>String[]&nbsp;{&nbsp;RIGHTS_VARIABLE&nbsp;};<br>
<br>
<font color="#ffffff">&nbsp;&nbsp;</font><font color="#7f0055"><b>private&nbsp;final&nbsp;static&nbsp;</b></font><font color="#000000">Map&lt;String,&nbsp;List&lt;String&gt;&gt;&nbsp;stateMap&nbsp;=&nbsp;</font><font color="#7f0055"><b>new&nbsp;</b></font><font color="#000000">HashMap&lt;String,&nbsp;List&lt;String&gt;&gt;</font><font color="#000000">()</font><font color="#000000">;</font><br>
&nbsp;&nbsp;<span class="keyword">private final static </span>Map&lt;String,&nbsp;List&lt;String&gt;&gt;&nbsp;stateMap&nbsp;=&nbsp;<span class="keyword">new </span>HashMap&lt;String,&nbsp;List&lt;String&gt;&gt;();<br>

<br>
<font color="#ffffff">&nbsp;&nbsp;</font><font color="#7f0055"><b>public&nbsp;</b></font><font color="#000000">Map&nbsp;getCurrentState</font><font color="#000000">()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;<FONT
color="#008000">/*&nbsp;"YourRightsHandler" is here just an example for&nbsp;a
&nbsp;&nbsp;<span class="keyword">public </span>Map&nbsp;getCurrentState()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;<span
class="comment">/*&nbsp;"YourRightsHandler" is here just an example for&nbsp;a
static class<BR>&nbsp;&nbsp;&nbsp;&nbsp; * which returns the list of
rights&nbsp;as&nbsp;a list of strings. */</FONT></font><br>
rights&nbsp;as&nbsp;a list of strings. */</span><br>

<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">stateMap.put</font><font color="#000000">(</font><font color="#000000">RIGHTS_VARIABLE,&nbsp;<EM>YourRightsHandler</EM>.getUserRights</font><font color="#000000">())</font><font color="#000000">;</font><br>
<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#7f0055"><b>return&nbsp;</b></font><font color="#000000">stateMap;</font><br>
<font color="#ffffff">&nbsp;&nbsp;</font><font color="#000000">}</font><br><br>
<font color="#ffffff">&nbsp;&nbsp;</font><font color="#7f0055"><b>public&nbsp;</b></font><font color="#000000">String</font><font color="#000000">[]&nbsp;</font><font color="#000000">getProvidedSourceNames</font><font color="#000000">()&nbsp;{</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;stateMap.put(RIGHTS_VARIABLE,&nbsp;<EM>YourRightsHandler</EM>.getUserRights());<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">return </span>stateMap;<br>
&nbsp;&nbsp;}<br><br>
&nbsp;&nbsp;<span class="keyword">public </span>String<[]&nbsp;getProvidedSourceNames()&nbsp;{<br>

<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#7f0055"><b>return&nbsp;</b></font><font color="#000000">PROVIDED_SOURCE_NAMES;</font><br>
<font color="#ffffff">&nbsp;&nbsp;</font><font color="#000000">}</font><br><BR>&nbsp;&nbsp;<FONT
color="#008000">/*&nbsp;This triggers an update of the rights variable state, and
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">return </span>PROVIDED_SOURCE_NAMES;<br>
&nbsp;&nbsp;}<br><BR>&nbsp;&nbsp;<span
class="comment">/*&nbsp;This triggers an update of the rights variable state, and
will update also all&nbsp;<BR>&nbsp;&nbsp; * listeners to the evaluation
service. So that every menu point, which is also <BR>&nbsp;&nbsp; * expression
controlled, gets updated too. */</FONT><br>
<font color="#ffffff">&nbsp;&nbsp;</font><font color="#7f0055"><b>public&nbsp;</b></font><font color="#7f0055"><b>void&nbsp;</b></font><font color="#000000">updateRights</font><font color="#000000">()&nbsp;{</font><br>
controlled, gets updated too. */</span><br>
&nbsp;&nbsp;<span class="keyword">public void </span>updateRights()&nbsp;{<br>

<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">fireSourceChanged</font><font color="#000000">(</font><font color="#990000">0</font><font color="#000000">,&nbsp;getCurrentState</font><font color="#000000">())</font><font color="#000000">;</font><br>
<font color="#ffffff">&nbsp;&nbsp;</font><font color="#000000">}</font><br><BR>&nbsp; // ...<br>
<font color="#000000">}</font></code>
</tt></p>
&nbsp;&nbsp;&nbsp;&nbsp;fireSourceChanged(<span class="value">0</span>,&nbsp;getCurrentState());<br>
&nbsp;&nbsp;}<br><BR>&nbsp; // ...<br>
}</code>
</p>

</body>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
<!DOCTYPE HTML><html lang="en">
<HEAD>

<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<meta charset="utf-8">
<TITLE>Contexts</TITLE>

<link rel="stylesheet" type="text/css" HREF="../book.css">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
<!DOCTYPE HTML><html lang="en">
<HEAD>

<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<meta charset="utf-8">
<TITLE>Decorators</TITLE>

<link rel="stylesheet" type="text/css" HREF="../book.css">
Expand All @@ -26,7 +23,7 @@ <H3>
binary and source projects.</p>


<p><img src="images/workbenchdecorators.png" alt="Package Explorer view with PDE decorators" border="0"></p>
<p><img src="images/workbenchdecorators.png" alt="Package Explorer view with PDE decorators"></p>


<p>The <b>com.example.helloworld&nbsp; </b>project is the only source project
Expand Down Expand Up @@ -136,7 +133,7 @@ <H3>
is on.&nbsp; This technique is used by the CVS client.</p>


<p><img src="images/cvsdecorators.png" alt="CVS decorators preference page" border="0"></p>
<p><img src="images/cvsdecorators.png" alt="CVS decorators preference page"></p>


<p>&nbsp;</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
<!DOCTYPE HTML><html lang="en">
<HEAD>

<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<meta charset="utf-8">
<TITLE>Element factories</TITLE>

<link rel="stylesheet" type="text/css" HREF="../book.css">
Expand All @@ -22,7 +19,7 @@ <H3>Element factories</H3>
that is used throughout the platform to add plug-in specific behavior to common platform model objects.</P>

<H4>
<a name="workbench_advext_adaptables">
<a id="workbench_advext_adaptables">
IAdaptables and workbench adapters</a></H4>
<P >
When browsing the various workbench classes, you will notice that many of the workbench interfaces extend the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
<!DOCTYPE HTML><html lang="en">
<HEAD>

<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"></script>
<meta charset="utf-8">
<script src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
<TITLE>org.eclipse.ui.perspectiveExtensions</TITLE>

<link rel="stylesheet" type="text/css" HREF="../book.css">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
<!DOCTYPE HTML><html lang="en">
<HEAD>

<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<meta charset="utf-8">
<TITLE>org.eclipse.ui.perspectives</TITLE>

<link rel="stylesheet" type="text/css" HREF="../book.css">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
<!DOCTYPE HTML><html lang="en">
<HEAD>

<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<meta charset="utf-8">
<TITLE>Contributing resource filters</TITLE>

<link rel="stylesheet" type="text/css" HREF="../book.css">
</HEAD>
<BODY>



<H3>
Contributing resource filters</H3>
<P >
Expand All @@ -39,7 +34,7 @@ <H3>
pull-down menu.</P>


<P ><img src="images/filtersmenu.png" alt="Resource filters menu" border="0" ></P>
<P ><img src="images/filtersmenu.png" alt="Resource filters menu" ></P>


<P >In addition to declaring the <b>filter pattern</b>,
Expand All @@ -49,10 +44,7 @@ <H3>
control which filter patterns are active.</P>


<P ><img src="images/filtersselection.png" alt="Filter selection dialog" border="0" ></P>



<P ><img src="images/filtersselection.png" alt="Filter selection dialog" ></P>

</BODY>
</HTML>
Loading
Loading