mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 23:25:26 +02:00
bug 149331 - Update tutorial to use current tutorial example code.
Get rid of etools references. changeClasspath and changePluginClass are no longer used.
This commit is contained in:
parent
575b13ddee
commit
17b8ed3c91
2 changed files with 0 additions and 175 deletions
|
@ -1,57 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
||||
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
||||
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
|
||||
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
|
||||
<title>Changes to Plug-in Project Classpath</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#ffffff">
|
||||
<h1>Changes to Plug-in Project Classpath</h1>
|
||||
<h2>NutShell</h2>
|
||||
To make sure you can compile your code successfully, you must add the following lines to the project's classpath,
|
||||
where <samp>RSE_HOME</samp> is the folder where you installed the product:</P>
|
||||
<ul>
|
||||
<li><samp>RSE_HOME/com.ibm.etools.systems.core_5.0.0/runtime/clientserver.jar</samp>
|
||||
<li><samp>RSE_HOME/com.ibm.etools.systems.core_5.0.0/runtime/systems.jar</samp>
|
||||
<li><samp>RSE_HOME/com.ibm.etools.systems.core_5.0.0/runtime/mofrt.jar</samp>
|
||||
<li><samp>RSE_HOME/com.ibm.etools.systems.logging_5.0.0/runtime/systemslogging.jar</samp>
|
||||
</ul>
|
||||
|
||||
<h2>Step-By-Step Details</h2>
|
||||
<p>Right-click on your project.Select <B>Properties</B>, and then select the
|
||||
<B><A href="pdeProj_props1.gif">Libraries</A></B> tab. You will now add the RSE jar files you
|
||||
need to reference, in order to compile the code successfully:
|
||||
</p>
|
||||
<ol>
|
||||
<LI type="i">
|
||||
Press the <B>Add Variable</B> button on the right of the list, to open the
|
||||
<A href="pdeProj_props_addvar1.gif">New Variable Classpath Entry</A> dialog.</LI>
|
||||
<LI type="i">
|
||||
Press the <B>New</B> button to open the <A href="pdeProj_props_addvar2.gif">New Variable Entry</A> dialog.
|
||||
Specify <B>"RSE_HOME"</B> for the <B>Name</B> and <B>"c:/WDSC/iSeries/eclipse/plugins"</B>
|
||||
for the <B>Path</B>, where "c:/WDSC" is the folder where you installed the Eclipse-based product you are running.
|
||||
Press<B> OK</B> to return to the New Variable Classpath Entry dialog.</LI>
|
||||
<LI type="i">Press the <B>Extend</B> button to get the <A href="pdeProj_props_addvar4.gif">Variable Extension</A> dialog.
|
||||
Find the folder <B><samp>com.ibm.etools.systems.core_5.0.0/runtime</samp></B>, expand it, and select <B><samp>system.jar</samp></B>.
|
||||
Press<B> OK</B> to return to the <A href="pdeProj_props2.gif">Libraries</A> tab, and select <B>No</B> on the<A
|
||||
href="pdeProj_props_addvar5.gif"> warning message</A>.</LI>
|
||||
<LI type="i">Press the <b>Add Variable</b> button to get the New Variable Classpath Entry dialog again, and select the <A
|
||||
href="pdeProj_props2_addvar1.gif">RSE_HOME</A> variable.
|
||||
Press <B>Extend</B> and select the <b><samp><A href="pdeProj_props2_addvar2.gif">mofrt.jar</A></samp></B> file in the same
|
||||
<b><samp>com.ibm.etools.systems.core_5.0.0/runtime</samp></B> folder.
|
||||
Press <b>OK</b> to return to the <A href="pdeProj_props3.gif">Libraries</A> tab.</LI>
|
||||
<LI type="i">Repeat the previous step, for <b><samp>systems.jar</samp></b> and <b><samp>clientserver.jar</samp></b>.
|
||||
|
||||
<LI type="i">Repeat the previous step, but this time select folder <B>com.ibm.etools.systems.logging_5.0.0/runtime</B>,
|
||||
and file <B><A href="pdeProj_props3.gif">systemslogging.jar</A></B>.
|
||||
Press <B>OK</B> to return to the <A href="pdeProj_props4.gif">Libraries</A> tab.</LI>
|
||||
<LI type="i">Press <B>OK</B> to close the <B><A href="pdeProj_props4.gif">Properties for
|
||||
RSESamples</A></B> dialog.
|
||||
</LI>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
|
@ -1,118 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
||||
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
||||
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
|
||||
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
|
||||
<title>Changes to Plug-in Class</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#ffffff">
|
||||
<h1>Changes to Plug-in Class</h1>
|
||||
<p>Here are the steps to change the wizard-generated plug-in class to
|
||||
extend the <A href="../api/plugin/uiPluginAPI.html">RSE plug-in class</A>.
|
||||
<ol>
|
||||
<LI type="i">Add the following import statements to the top of <samp>RSESamplesPlugin.java</samp>:
|
||||
<pre><code>
|
||||
import com.ibm.etools.systems.core.*;
|
||||
import com.ibm.etools.systems.core.ui.messages.*;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.jface.preference.*;
|
||||
</code></pre>
|
||||
</LI>
|
||||
<li type="i">Change the <b>extends</b> clause in the class declaration to extend <samp><b>SystemBasePlugin</b></samp> instead of
|
||||
<samp>AbstractUIPlugin</samp>:
|
||||
<pre><code>
|
||||
public class RSESamplesPlugin extends <b>SystemBasePlugin</b> {
|
||||
</code></pre>
|
||||
</li>
|
||||
<li type="i">Add the following class field declaration:
|
||||
<pre><code>
|
||||
private static SystemMessageFile messageFile = null;
|
||||
</code></pre>
|
||||
</li>
|
||||
<li type="i">Change the constructor as highlighted here:
|
||||
<pre><code>
|
||||
/**
|
||||
* The constructor.
|
||||
*/
|
||||
public RSESamplesPlugin(IPluginDescriptor descriptor) {
|
||||
super(descriptor, <b>"RSESamples"</b>);
|
||||
plugin = this;
|
||||
<i>//try {</i>
|
||||
<i>// resourceBundle= ResourceBundle.getBundle("RSESamples.RSESamplesPluginResources");</i>
|
||||
<i>//} catch (MissingResourceException x) {</i>
|
||||
<i>// resourceBundle = null;</i>
|
||||
<i>//} </i>
|
||||
<b>resourceBundle = loadResourceBundle(descriptor,"rseSamplesResources");</b>
|
||||
<b>messageFile = loadMessageFile(descriptor,"rseSamplesMessages.xml");</b>
|
||||
}
|
||||
</code></pre>
|
||||
</li>
|
||||
<li type="i">Change the <b><samp>getResourceString</samp></b> method as highlighted here:
|
||||
<pre><code>
|
||||
/**
|
||||
* Returns the string from the plugin's resource bundle,
|
||||
* or 'key' if not found.
|
||||
*/
|
||||
public static String getResourceString(String key) {
|
||||
ResourceBundle bundle= RSESamplesPlugin.getDefault().getResourceBundle();
|
||||
<b>return getString(bundle, key); // <i>inherited method.</i></b>
|
||||
<i>//try {</i>
|
||||
<i>// return bundle.getString(key);</i>
|
||||
<i>//} catch (MissingResourceException e) {</i>
|
||||
<i>// return key;</i>
|
||||
<i>//}</i>
|
||||
}
|
||||
</code></pre>
|
||||
</li>
|
||||
<li type="i">Add the following methods to the end of the class:
|
||||
<pre><code>
|
||||
/**
|
||||
* @see AbstractUIPlugin#initializeDefaultPreferences
|
||||
*/
|
||||
protected void <b>initializeDefaultPreferences</b>(IPreferenceStore store)
|
||||
{
|
||||
super.initializeDefaultPreferences(store);
|
||||
<i>//RSESamplesPreferencePage.initDefaults(store);</i>
|
||||
}
|
||||
/**
|
||||
* Initialize the image registry by declaring all of the required graphics.
|
||||
*/
|
||||
protected void <b>initializeImageRegistry</b>()
|
||||
{
|
||||
String path = getIconPath();
|
||||
<i>//putImageInRegistry(ISamplesConstants.ICON_XXX_ID,</i>
|
||||
<i>// path+ISamplesConstants.ICON_XXX);</i>
|
||||
<i>// TO RETRIEVE AN ICON, CALL GETIMAGE OR GETIMAGEDESCRIPTOR WITH ITS XXX_ID ID</i>
|
||||
}
|
||||
/**
|
||||
* Starts up this plug-in and returns whether startup was successful.
|
||||
*/
|
||||
public void <b>startup</b>() throws CoreException
|
||||
{
|
||||
super.startup();
|
||||
}
|
||||
/**
|
||||
* Return our message file
|
||||
*/
|
||||
public static SystemMessageFile <b>getPluginMessageFile</b>()
|
||||
{
|
||||
return messageFile;
|
||||
}
|
||||
/**
|
||||
* Retrieve a message from this plugin's message file
|
||||
*/
|
||||
public static SystemMessage <b>getPluginMessage</b>(String msgId)
|
||||
{
|
||||
return getMessage(messageFile, msgId);
|
||||
}
|
||||
</code></pre>
|
||||
</li>
|
||||
<li type="i">Click <A href="RSESamplesPlugin.html">here</A> to see the full finished class.
|
||||
</li>
|
||||
</ol>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Reference in a new issue