[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-dev] editor in RCP app not working
|
Andreas,
Please post such questions to the org.eclipse.platform or
org.eclipse.platform.rcp newsgroups.
http://eclipse.org/newsgroups/index.html
>From the mailing lists sign-up page:
"Technical questions and discussions about using eclipse and eclipse-based
tools, and developing plug-in tools should be posted to the newsgroups.
Mailing lists at eclipse.org are intended for use by developers actually
working on or otherwise contributing to day-to-day development. The
development mailing lists are the way design and implementation issues are
discussed and decisions voted on by the committers. "
For this one, you should also indicate how you're trying to open the
editor. Are you explicitly calling IWorkbenchPage.openEditor(...), or are
you expecting it to show up in one of the navigator views? What kind of
input does it expect, etc.
Thanks,
Nick
"Andreas Pakulat" <apaku@xxxxxx>
Sent by: platform-dev-bounces@xxxxxxxxxxx
04/28/2005 09:38 AM
Please respond to
"Eclipse platform general developers list."
To
platform-dev@xxxxxxxxxxx
cc
Subject
[platform-dev] editor in RCP app not working
Hi,
if this isn't the right list for the question, please feel free to direct
me
to the proper mailing list.
I created a very basic RCP application with 3 views and wanted to create
an
editor for it now. So I added a new extension to the plugin.xml havin
class
and id point to the class for the edior and gave a name. contributors is
filled with org.eclipse.ui.part.EditorActionBarContributor, as I don't
need
that now.
Then i created the class as subclass of FormEditor (I want to display such
forms) and created a FormPage subclass to display a label and a text
field.
But it seems that the code for my Editor is never run, so question is:
What
have I forgotten to do.
I'm new to Eclipse and RCP programming and a little bit lost on where to
look for any errors (I do see some errors from classes in
org.eclipse.update.ui but they don't seem to be related to my problem)
Thanks,
Andreas
PS: parts of my soruces:
plugin.xml:
--------------------------------------
<extension
point="org.eclipse.ui.editors">
<editor
class="de.test1.workflowaddon.FormularEditor"
default="true"
name="Formulareditor"
contributorClass="org.eclipse.ui.part.EditorActionBarContributor"
id="de.test1.workflowaddon.FormularEditor"
/>
</extension>
--------------------------------------
FormularEditor.java:
---------------------------------------------------
package de.test1.workflowaddon;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.FormPage;
import org.eclipse.ui.forms.widgets.ScrolledForm;
public class FormularEditor extends FormEditor {
class FormularFormPage extends FormPage {
FormularFormPage(FormEditor fe, String
id, String title)
{
super (fe,id,title);
}
protected void
createFormContent(IManagedForm mf)
{
super.createFormContent(mf);
ScrolledForm f =
mf.getForm();
f.setText("Formular:");
f.getBody().setLayout(new
GridLayout());
mf.getToolkit().createLabel(f.getBody(), "Feld1:");
mf.getToolkit().createText(f.getBody(), "Wert1");
mf.getToolkit().createHyperlink(f.getBody(), "Dies ist der Text", 0);
mf.refresh();
}
}
protected void addPages() {
FormularFormPage fp = new
FormularFormPage(this, "MainFormpage",
"Formular");
try {
addPage(fp);
}catch ( PartInitException pie ) {
}
}
public void doSave(IProgressMonitor monitor) {
}
public void doSaveAs() {
}
public boolean isSaveAsAllowed() {
return false;
}
}
_______________________________________________
platform-dev mailing list
platform-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-dev