Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Error view problem
Error view problem [message #115926] Mon, 25 August 2003 08:34 Go to next message
Eclipse UserFriend
Originally posted by: pkumar.louveciennes.sema.slb.com

When i am trying to open the error view it is giving me an error
saying that
"An error has occured during creating this view"
How can this be solved.
Please reply.I am stuck due to this as i cann't see the errors in my
plugin.

Thanx a lot .
Prameela
Re: Error view problem [message #116199 is a reply to message #115926] Mon, 25 August 2003 11:29 Go to previous messageGo to next message
Eclipse UserFriend
Finding the workspace .log file:

Alternative 1:
Window > Show View > PDE Runtime > Error Log
This gives you a view with the contents of the .log file.

Alternative 2:
Help > About Eclipse Platform > Configuration Details

Alternative 3:
locate the file yourself, <yourworkspace>/.metadata/.log

If you cannot show the error view, it looks like JDT is broken.
Have you been playing with your plugins directory?
Everything else still works?


Chris



"Prameela" <pkumar@louveciennes.sema.slb.com> wrote in message
news:bicvmu$9eq$1@eclipse.org...
> When i am trying to open the error view it is giving me an error
> saying that
> "An error has occured during creating this view"
> How can this be solved.
> Please reply.I am stuck due to this as i cann't see the errors in my
> plugin.
>
> Thanx a lot .
> Prameela
>
Re: Error view problem [message #116355 is a reply to message #116199] Mon, 25 August 2003 12:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pkumar.louveciennes.sema.slb.com

yes i am trying to make a new plugin, plugin is using classes from
from jdt. ui and jdt.core. I really don't understand what the problem
could be and how it could be solved! I tried all the three options, but
without success for first two and of course the third one is not an easy
option (although i am using that eversince the jdt's broken.).

I think there are some problems, my plugins when I try to run , raises
exception, but it is not showing what exception is it raising.
So what's the solution for broken jdt.I have reinstalled eclipse. but
there's no change, the view won't show, I am stuck with it, the whole
day is being spent on it, would appreciate greatly anyhelp for solving
the problem.
Thanx a lot for your reply.
Prameela

Chris Laffra wrote:

> Finding the workspace .log file:
>
> Alternative 1:
> Window > Show View > PDE Runtime > Error Log
> This gives you a view with the contents of the .log file.
>
> Alternative 2:
> Help > About Eclipse Platform > Configuration Details
>
> Alternative 3:
> locate the file yourself, <yourworkspace>/.metadata/.log
>
> If you cannot show the error view, it looks like JDT is broken.
> Have you been playing with your plugins directory?
> Everything else still works?
>
>
> Chris
>
>
>
> "Prameela" <pkumar@louveciennes.sema.slb.com> wrote in message
> news:bicvmu$9eq$1@eclipse.org...
>
>> When i am trying to open the error view it is giving me an error
>>saying that
>>"An error has occured during creating this view"
>>How can this be solved.
>>Please reply.I am stuck due to this as i cann't see the errors in my
>>plugin.
>>
>>Thanx a lot .
>>Prameela
>>
>
>
>
Re: Error view problem [message #116363 is a reply to message #116355] Mon, 25 August 2003 13:05 Go to previous messageGo to next message
Eclipse UserFriend
Could you empty you .log, restart Eclipse, and then append
your .log file, so we all can have a look at it?

Chris

"Prameela" <pkumar@louveciennes.sema.slb.com> wrote in message
news:bidcv0$pe5$1@eclipse.org...
> yes i am trying to make a new plugin, plugin is using classes from
> from jdt. ui and jdt.core. I really don't understand what the problem
> could be and how it could be solved! I tried all the three options, but
> without success for first two and of course the third one is not an easy
> option (although i am using that eversince the jdt's broken.).
>
> I think there are some problems, my plugins when I try to run , raises
> exception, but it is not showing what exception is it raising.
> So what's the solution for broken jdt.I have reinstalled eclipse. but
> there's no change, the view won't show, I am stuck with it, the whole
> day is being spent on it, would appreciate greatly anyhelp for solving
> the problem.
> Thanx a lot for your reply.
> Prameela
>
> Chris Laffra wrote:
>
> > Finding the workspace .log file:
> >
> > Alternative 1:
> > Window > Show View > PDE Runtime > Error Log
> > This gives you a view with the contents of the .log file.
> >
> > Alternative 2:
> > Help > About Eclipse Platform > Configuration Details
> >
> > Alternative 3:
> > locate the file yourself, <yourworkspace>/.metadata/.log
> >
> > If you cannot show the error view, it looks like JDT is broken.
> > Have you been playing with your plugins directory?
> > Everything else still works?
> >
> >
> > Chris
> >
> >
> >
> > "Prameela" <pkumar@louveciennes.sema.slb.com> wrote in message
> > news:bicvmu$9eq$1@eclipse.org...
> >
> >> When i am trying to open the error view it is giving me an error
> >>saying that
> >>"An error has occured during creating this view"
> >>How can this be solved.
> >>Please reply.I am stuck due to this as i cann't see the errors in my
> >>plugin.
> >>
> >>Thanx a lot .
> >>Prameela
> >>
> >
> >
> >
>
Re: Error view problem [message #116505 is a reply to message #116363] Tue, 26 August 2003 03:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pkumar.louveciennes.sema.slb.com

This is a multi-part message in MIME format.
--------------030406010007000404080309
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

I got the message late.
Well the ErrorLogView is fine now, all i did was restart the machine and
start the eclipse and opened the view.
Now regarding the error, I am getting a classcast exception.
Please find attached the .log. and the code
Thanx

Chris Laffra wrote:
> Could you empty you .log, restart Eclipse, and then append
> your .log file, so we all can have a look at it?
>
> Chris
>
> "Prameela" <pkumar@louveciennes.sema.slb.com> wrote in message
> news:bidcv0$pe5$1@eclipse.org...
>
>> yes i am trying to make a new plugin, plugin is using classes from
>>from jdt. ui and jdt.core. I really don't understand what the problem
>>could be and how it could be solved! I tried all the three options, but
>>without success for first two and of course the third one is not an easy
>>option (although i am using that eversince the jdt's broken.).
>>
>>I think there are some problems, my plugins when I try to run , raises
>>exception, but it is not showing what exception is it raising.
>> So what's the solution for broken jdt.I have reinstalled eclipse. but
>>there's no change, the view won't show, I am stuck with it, the whole
>>day is being spent on it, would appreciate greatly anyhelp for solving
>>the problem.
>>Thanx a lot for your reply.
>>Prameela
>>
>>Chris Laffra wrote:
>>
>>
>>>Finding the workspace .log file:
>>>
>>>Alternative 1:
>>> Window > Show View > PDE Runtime > Error Log
>>> This gives you a view with the contents of the .log file.
>>>
>>>Alternative 2:
>>> Help > About Eclipse Platform > Configuration Details
>>>
>>>Alternative 3:
>>> locate the file yourself, <yourworkspace>/.metadata/.log
>>>
>>>If you cannot show the error view, it looks like JDT is broken.
>>>Have you been playing with your plugins directory?
>>>Everything else still works?
>>>
>>>
>>>Chris
>>>
>>>
>>>
>>>"Prameela" <pkumar@louveciennes.sema.slb.com> wrote in message
>>>news:bicvmu$9eq$1@eclipse.org...
>>>
>>>
>>>> When i am trying to open the error view it is giving me an error
>>>>saying that
>>>>"An error has occured during creating this view"
>>>>How can this be solved.
>>>>Please reply.I am stuck due to this as i cann't see the errors in my
>>>>plugin.
>>>>
>>>>Thanx a lot .
>>>>Prameela
>>>>
>>>
>>>
>>>
>
>

--------------030406010007000404080309
Content-Type: text/plain;
name=".log"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
filename=".log"

!SESSION août 26, 2003 09:01:58.229 --------------------------------------------
java.version=1.3.1_01
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR
Command-line arguments: -os win32 -ws win32 -arch x86 -install file:D:/work/ECLIPSE/eclipse/
!ENTRY org.eclipse.ui.workbench 4 2 août 26, 2003 09:01:58.229
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 0
java.lang.ClassCastException: com.slb.pk.JCDTProject.wizards.wizards.SampleNewWizard
at org.eclipse.ui.internal.dialogs.NewWizardNewPage$2.createWiz ard(NewWizardNewPage.java:293)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$2.run(Wo rkbenchWizardNode.java:88)
at org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:1015)
at org.eclipse.core.runtime.Platform.run(Platform.java:420)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$1.run(Wo rkbenchWizardNode.java:85)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:84)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode.getWizar d(WorkbenchWizardNode.java:83)
at org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(Wiz ardSelectionPage.java:96)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:677)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:316)
at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.jav a:423)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:583 )
at org.eclipse.jface.window.Window.open(Window.java:563)
at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.j ava:136)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:542)
at org.eclipse.jface.action.ActionContributionItem.access$4(Act ionContributionItem.java:496)
at org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:468)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1383)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1366)
at org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:858)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at java.lang.reflect.Method.invoke(Native Method)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
!ENTRY org.eclipse.ui 4 4 août 26, 2003 09:01:58.239
!MESSAGE Unhandled exception caught in event loop.
!ENTRY org.eclipse.ui 4 0 août 26, 2003 09:01:58.239
!MESSAGE
!STACK 0
java.lang.IllegalArgumentException:
at org.eclipse.core.internal.runtime.Assert.isLegal(Assert.java :56)
at org.eclipse.core.internal.runtime.Assert.isLegal(Assert.java :41)
at org.eclipse.core.runtime.Status.setPlugin(Status.java:165)
at org.eclipse.core.runtime.Status.<init>(Status.java:73)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$2.handle Exception(WorkbenchWizardNode.java:99)
at org.eclipse.core.internal.runtime.InternalPlatform.handleExc eption(InternalPlatform.java:467)
at org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:1017)
at org.eclipse.core.runtime.Platform.run(Platform.java:420)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$1.run(Wo rkbenchWizardNode.java:85)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:84)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode.getWizar d(WorkbenchWizardNode.java:83)
at org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(Wiz ardSelectionPage.java:96)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:677)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:316)
at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.jav a:423)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:583 )
at org.eclipse.jface.window.Window.open(Window.java:563)
at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.j ava:136)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:542)
at org.eclipse.jface.action.ActionContributionItem.access$4(Act ionContributionItem.java:496)
at org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:468)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1383)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1366)
at org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:858)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at java.lang.reflect.Method.invoke(Native Method)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
!ENTRY org.eclipse.ui.workbench 4 2 août 26, 2003 09:02:07.72
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 0
java.lang.ClassCastException: com.slb.pk.JCDTProject.wizards.wizards.SampleNewWizard
at org.eclipse.ui.internal.dialogs.NewWizardNewPage$2.createWiz ard(NewWizardNewPage.java:293)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$2.run(Wo rkbenchWizardNode.java:88)
at org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:1015)
at org.eclipse.core.runtime.Platform.run(Platform.java:420)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$1.run(Wo rkbenchWizardNode.java:85)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:84)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode.getWizar d(WorkbenchWizardNode.java:83)
at org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(Wiz ardSelectionPage.java:96)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:677)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:316)
at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.jav a:423)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:583 )
at org.eclipse.jface.window.Window.open(Window.java:563)
at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.j ava:136)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:542)
at org.eclipse.jface.action.ActionContributionItem.access$4(Act ionContributionItem.java:496)
at org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:468)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1383)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1366)
at org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:858)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at java.lang.reflect.Method.invoke(Native Method)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
!ENTRY org.eclipse.ui 4 4 août 26, 2003 09:02:07.72
!MESSAGE Unhandled exception caught in event loop.
!ENTRY org.eclipse.ui 4 0 août 26, 2003 09:02:07.82
!MESSAGE
!STACK 0
java.lang.IllegalArgumentException:
at org.eclipse.core.internal.runtime.Assert.isLegal(Assert.java :56)
at org.eclipse.core.internal.runtime.Assert.isLegal(Assert.java :41)
at org.eclipse.core.runtime.Status.setPlugin(Status.java:165)
at org.eclipse.core.runtime.Status.<init>(Status.java:73)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$2.handle Exception(WorkbenchWizardNode.java:99)
at org.eclipse.core.internal.runtime.InternalPlatform.handleExc eption(InternalPlatform.java:467)
at org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:1017)
at org.eclipse.core.runtime.Platform.run(Platform.java:420)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$1.run(Wo rkbenchWizardNode.java:85)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:84)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode.getWizar d(WorkbenchWizardNode.java:83)
at org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(Wiz ardSelectionPage.java:96)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:677)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:316)
at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.jav a:423)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:583 )
at org.eclipse.jface.window.Window.open(Window.java:563)
at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.j ava:136)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:542)
at org.eclipse.jface.action.ActionContributionItem.access$4(Act ionContributionItem.java:496)
at org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:468)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1383)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1366)
at org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:858)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at java.lang.reflect.Method.invoke(Native Method)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)

--------------030406010007000404080309
Content-Type: text/plain;
name="SampleNewWizard.java"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="SampleNewWizard.java"

package com.slb.pk.JCDTProject.wizards.wizards;

import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.core.runtime.*;
import org.eclipse.jface.operation.*;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.CoreException;
import java.io.*;
import org.eclipse.ui.*;

/**
* This is a sample new wizard. Its role is to create a new file
* resource in the provided container. If the container resource
* (a folder or a project) is selected in the workspace
* when the wizard is opened, it will accept it as the target
* container. The wizard creates one file with the extension
* "mpe". If a sample multi-page editor (also available
* as a template) is registered for the same extension, it will
* be able to open it.
*/

public class SampleNewWizard extends Wizard
{
private SampleNewWizardPage page;
private ISelection selection;
private IProject project;



/**
* Constructor for SampleNewWizard.
*/
public SampleNewWizard() {
super();
setNeedsProgressMonitor(true);
}


public void init(IWorkbench workbench,IStructuredSelection selection) {

this.selection = selection;

}

/**
* Adding the page to the wizard.
*/

public void addPages() {


page = new SampleNewWizardPage(selection);
addPage(page);
}

/**
* This method is called when 'Finish' button is pressed in
* the wizard. We will create an operation and run it
* using wizard as execution context.
*/
public boolean performFinish()
{
final String containerName = page.getContainerName();
final String fileName = page.getFileName();
IRunnableWithProgress op = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException {
try {
doFinish(containerName, fileName, monitor);
} catch (CoreException e) {
throw new InvocationTargetException(e);
} finally {
monitor.done();
}
}
};
try {
getContainer().run(true, false, op);
} catch (InterruptedException e) {
return false;
} catch (InvocationTargetException e) {
Throwable realException = e.getTargetException();
MessageDialog.openError(getShell(), "Error", realException.getMessage());
return false;
}
return true;
}

/**
* The worker method. It will find the container, create the
* file if missing or just replace its contents, and open
* the editor on the newly created file.
*/

private void doFinish(
String containerName,
String fileName,
IProgressMonitor monitor)
throws CoreException {
// create a sample file
monitor.beginTask("Creating " + fileName, 2);
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IResource resource = root.findMember(new Path(containerName));
if (!resource.exists() || !(resource instanceof IContainer)) {
throwCoreException("Container \"" + containerName + "\" does not exist.");
}
IContainer container = (IContainer) resource;
final IFile file = container.getFile(new Path(fileName));
try {
InputStream stream = openContentStream();
if (file.exists()) {
file.setContents(stream, true, true, monitor);
} else {
file.create(stream, true, monitor);
}
stream.close();
} catch (IOException e) {
}
monitor.worked(1);
monitor.setTaskName("Opening file for editing...");
getShell().getDisplay().asyncExec(new Runnable() {
public void run() {
IWorkbenchPage page =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage();
try {
page.openEditor(file);
} catch (PartInitException e) {
}
}
});
monitor.worked(1);
}

/**
* We will initialize file contents with a sample text.
*/

private InputStream openContentStream() {
String contents =
"This is the initial file contents for *.mpe file that should be word-sorted in the Preview page of the multi-page editor";
return new ByteArrayInputStream(contents.getBytes());
}

private void throwCoreException(String message) throws CoreException {
IStatus status =
new Status(IStatus.ERROR, "com.slb.pk.JCDTProject.wizards", IStatus.OK, message, null);
throw new CoreException(status);
}


}
--------------030406010007000404080309--
Re: Error view problem [message #116663 is a reply to message #116505] Tue, 26 August 2003 13:48 Go to previous message
Eclipse UserFriend
Have you looked at line 293 of NewWizardNewPage.java?
That is where the class cast exception occurs.

Chris

"Prameela" <pkumar@louveciennes.sema.slb.com> wrote in message
news:bif1gt$do6$1@eclipse.org...
> I got the message late.
> Well the ErrorLogView is fine now, all i did was restart the machine and
> start the eclipse and opened the view.
> Now regarding the error, I am getting a classcast exception.
> Please find attached the .log. and the code
> Thanx
>
> Chris Laffra wrote:
> > Could you empty you .log, restart Eclipse, and then append
> > your .log file, so we all can have a look at it?
> >
> > Chris
> >
> > "Prameela" <pkumar@louveciennes.sema.slb.com> wrote in message
> > news:bidcv0$pe5$1@eclipse.org...
> >
> >> yes i am trying to make a new plugin, plugin is using classes from
> >>from jdt. ui and jdt.core. I really don't understand what the problem
> >>could be and how it could be solved! I tried all the three options, but
> >>without success for first two and of course the third one is not an easy
> >>option (although i am using that eversince the jdt's broken.).
> >>
> >>I think there are some problems, my plugins when I try to run , raises
> >>exception, but it is not showing what exception is it raising.
> >> So what's the solution for broken jdt.I have reinstalled eclipse. but
> >>there's no change, the view won't show, I am stuck with it, the whole
> >>day is being spent on it, would appreciate greatly anyhelp for solving
> >>the problem.
> >>Thanx a lot for your reply.
> >>Prameela
> >>
> >>Chris Laffra wrote:
> >>
> >>
> >>>Finding the workspace .log file:
> >>>
> >>>Alternative 1:
> >>> Window > Show View > PDE Runtime > Error Log
> >>> This gives you a view with the contents of the .log file.
> >>>
> >>>Alternative 2:
> >>> Help > About Eclipse Platform > Configuration Details
> >>>
> >>>Alternative 3:
> >>> locate the file yourself, <yourworkspace>/.metadata/.log
> >>>
> >>>If you cannot show the error view, it looks like JDT is broken.
> >>>Have you been playing with your plugins directory?
> >>>Everything else still works?
> >>>
> >>>
> >>>Chris
> >>>
> >>>
> >>>
> >>>"Prameela" <pkumar@louveciennes.sema.slb.com> wrote in message
> >>>news:bicvmu$9eq$1@eclipse.org...
> >>>
> >>>
> >>>> When i am trying to open the error view it is giving me an error
> >>>>saying that
> >>>>"An error has occured during creating this view"
> >>>>How can this be solved.
> >>>>Please reply.I am stuck due to this as i cann't see the errors in my
> >>>>plugin.
> >>>>
> >>>>Thanx a lot .
> >>>>Prameela
> >>>>
> >>>
> >>>
> >>>
> >
> >
>


------------------------------------------------------------ ----------------
----


> !SESSION août 26, 2003
09:01:58.229 --------------------------------------------
> java.version=1.3.1_01
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR
> Command-line arguments: -os win32 -ws win32 -arch x86 -install
file:D:/work/ECLIPSE/eclipse/
> !ENTRY org.eclipse.ui.workbench 4 2 août 26, 2003 09:01:58.229
> !MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.ui.workbench".
> !STACK 0
> java.lang.ClassCastException:
com.slb.pk.JCDTProject.wizards.wizards.SampleNewWizard
> at
org.eclipse.ui.internal.dialogs.NewWizardNewPage$2.createWiz ard(NewWizardNew
Page.java:293)
> at
org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$2.run(Wo rkbenchWizardNod
e.java:88)
> at
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java
:1015)
> at org.eclipse.core.runtime.Platform.run(Platform.java:420)
> at
org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$1.run(Wo rkbenchWizardNod
e.java:85)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:84)
> at
org.eclipse.ui.internal.dialogs.WorkbenchWizardNode.getWizar d(WorkbenchWizar
dNode.java:83)
> at
org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(Wiz ardSelectionPage
..java:96)
> at
org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:677)
> at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:316)
> at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.jav a:423)
> at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:583 )
> at org.eclipse.jface.window.Window.open(Window.java:563)
> at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.j ava:136)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
> at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
ContributionItem.java:542)
> at
org.eclipse.jface.action.ActionContributionItem.access$4(Act ionContributionI
tem.java:496)
> at
org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContribu
tionItem.java:468)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1383)
> at org.eclipse.ui.internal.Workbench.run(Workbench.java:1366)
> at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
a:858)
> at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
> at java.lang.reflect.Method.invoke(Native Method)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
> at org.eclipse.core.launcher.Main.run(Main.java:747)
> at org.eclipse.core.launcher.Main.main(Main.java:583)
> !ENTRY org.eclipse.ui 4 4 août 26, 2003 09:01:58.239
> !MESSAGE Unhandled exception caught in event loop.
> !ENTRY org.eclipse.ui 4 0 août 26, 2003 09:01:58.239
> !MESSAGE
> !STACK 0
> java.lang.IllegalArgumentException:
> at org.eclipse.core.internal.runtime.Assert.isLegal(Assert.java :56)
> at org.eclipse.core.internal.runtime.Assert.isLegal(Assert.java :41)
> at org.eclipse.core.runtime.Status.setPlugin(Status.java:165)
> at org.eclipse.core.runtime.Status.<init>(Status.java:73)
> at
org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$2.handle Exception(Workbe
nchWizardNode.java:99)
> at
org.eclipse.core.internal.runtime.InternalPlatform.handleExc eption(InternalP
latform.java:467)
> at
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java
:1017)
> at org.eclipse.core.runtime.Platform.run(Platform.java:420)
> at
org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$1.run(Wo rkbenchWizardNod
e.java:85)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:84)
> at
org.eclipse.ui.internal.dialogs.WorkbenchWizardNode.getWizar d(WorkbenchWizar
dNode.java:83)
> at
org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(Wiz ardSelectionPage
..java:96)
> at
org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:677)
> at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:316)
> at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.jav a:423)
> at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:583 )
> at org.eclipse.jface.window.Window.open(Window.java:563)
> at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.j ava:136)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
> at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
ContributionItem.java:542)
> at
org.eclipse.jface.action.ActionContributionItem.access$4(Act ionContributionI
tem.java:496)
> at
org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContribu
tionItem.java:468)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1383)
> at org.eclipse.ui.internal.Workbench.run(Workbench.java:1366)
> at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
a:858)
> at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
> at java.lang.reflect.Method.invoke(Native Method)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
> at org.eclipse.core.launcher.Main.run(Main.java:747)
> at org.eclipse.core.launcher.Main.main(Main.java:583)
> !ENTRY org.eclipse.ui.workbench 4 2 août 26, 2003 09:02:07.72
> !MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.ui.workbench".
> !STACK 0
> java.lang.ClassCastException:
com.slb.pk.JCDTProject.wizards.wizards.SampleNewWizard
> at
org.eclipse.ui.internal.dialogs.NewWizardNewPage$2.createWiz ard(NewWizardNew
Page.java:293)
> at
org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$2.run(Wo rkbenchWizardNod
e.java:88)
> at
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java
:1015)
> at org.eclipse.core.runtime.Platform.run(Platform.java:420)
> at
org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$1.run(Wo rkbenchWizardNod
e.java:85)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:84)
> at
org.eclipse.ui.internal.dialogs.WorkbenchWizardNode.getWizar d(WorkbenchWizar
dNode.java:83)
> at
org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(Wiz ardSelectionPage
..java:96)
> at
org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:677)
> at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:316)
> at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.jav a:423)
> at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:583 )
> at org.eclipse.jface.window.Window.open(Window.java:563)
> at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.j ava:136)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
> at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
ContributionItem.java:542)
> at
org.eclipse.jface.action.ActionContributionItem.access$4(Act ionContributionI
tem.java:496)
> at
org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContribu
tionItem.java:468)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1383)
> at org.eclipse.ui.internal.Workbench.run(Workbench.java:1366)
> at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
a:858)
> at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
> at java.lang.reflect.Method.invoke(Native Method)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
> at org.eclipse.core.launcher.Main.run(Main.java:747)
> at org.eclipse.core.launcher.Main.main(Main.java:583)
> !ENTRY org.eclipse.ui 4 4 août 26, 2003 09:02:07.72
> !MESSAGE Unhandled exception caught in event loop.
> !ENTRY org.eclipse.ui 4 0 août 26, 2003 09:02:07.82
> !MESSAGE
> !STACK 0
> java.lang.IllegalArgumentException:
> at org.eclipse.core.internal.runtime.Assert.isLegal(Assert.java :56)
> at org.eclipse.core.internal.runtime.Assert.isLegal(Assert.java :41)
> at org.eclipse.core.runtime.Status.setPlugin(Status.java:165)
> at org.eclipse.core.runtime.Status.<init>(Status.java:73)
> at
org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$2.handle Exception(Workbe
nchWizardNode.java:99)
> at
org.eclipse.core.internal.runtime.InternalPlatform.handleExc eption(InternalP
latform.java:467)
> at
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java
:1017)
> at org.eclipse.core.runtime.Platform.run(Platform.java:420)
> at
org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$1.run(Wo rkbenchWizardNod
e.java:85)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:84)
> at
org.eclipse.ui.internal.dialogs.WorkbenchWizardNode.getWizar d(WorkbenchWizar
dNode.java:83)
> at
org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(Wiz ardSelectionPage
..java:96)
> at
org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:677)
> at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:316)
> at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.jav a:423)
> at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:583 )
> at org.eclipse.jface.window.Window.open(Window.java:563)
> at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.j ava:136)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
> at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
ContributionItem.java:542)
> at
org.eclipse.jface.action.ActionContributionItem.access$4(Act ionContributionI
tem.java:496)
> at
org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContribu
tionItem.java:468)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2041)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1747)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1383)
> at org.eclipse.ui.internal.Workbench.run(Workbench.java:1366)
> at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
a:858)
> at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
> at java.lang.reflect.Method.invoke(Native Method)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
> at org.eclipse.core.launcher.Main.run(Main.java:747)
> at org.eclipse.core.launcher.Main.main(Main.java:583)
>


------------------------------------------------------------ ----------------
----


> package com.slb.pk.JCDTProject.wizards.wizards;
>
> import org.eclipse.jface.viewers.IStructuredSelection;
> import org.eclipse.jface.wizard.Wizard;
> import org.eclipse.ui.INewWizard;
> import org.eclipse.ui.IWorkbench;
> import org.eclipse.core.runtime.*;
> import org.eclipse.jface.operation.*;
> import java.lang.reflect.InvocationTargetException;
> import org.eclipse.jface.dialogs.MessageDialog;
> import org.eclipse.jface.viewers.ISelection;
> import org.eclipse.core.resources.*;
> import org.eclipse.core.runtime.CoreException;
> import java.io.*;
> import org.eclipse.ui.*;
>
> /**
> * This is a sample new wizard. Its role is to create a new file
> * resource in the provided container. If the container resource
> * (a folder or a project) is selected in the workspace
> * when the wizard is opened, it will accept it as the target
> * container. The wizard creates one file with the extension
> * "mpe". If a sample multi-page editor (also available
> * as a template) is registered for the same extension, it will
> * be able to open it.
> */
>
> public class SampleNewWizard extends Wizard
> {
> private SampleNewWizardPage page;
> private ISelection selection;
> private IProject project;
>
>
>
> /**
> * Constructor for SampleNewWizard.
> */
> public SampleNewWizard() {
> super();
> setNeedsProgressMonitor(true);
> }
>
>
> public void init(IWorkbench workbench,IStructuredSelection selection) {
>
> this.selection = selection;
>
> }
>
> /**
> * Adding the page to the wizard.
> */
>
> public void addPages() {
>
>
> page = new SampleNewWizardPage(selection);
> addPage(page);
> }
>
> /**
> * This method is called when 'Finish' button is pressed in
> * the wizard. We will create an operation and run it
> * using wizard as execution context.
> */
> public boolean performFinish()
> {
> final String containerName = page.getContainerName();
> final String fileName = page.getFileName();
> IRunnableWithProgress op = new IRunnableWithProgress() {
> public void run(IProgressMonitor monitor) throws InvocationTargetException
{
> try {
> doFinish(containerName, fileName, monitor);
> } catch (CoreException e) {
> throw new InvocationTargetException(e);
> } finally {
> monitor.done();
> }
> }
> };
> try {
> getContainer().run(true, false, op);
> } catch (InterruptedException e) {
> return false;
> } catch (InvocationTargetException e) {
> Throwable realException = e.getTargetException();
> MessageDialog.openError(getShell(), "Error", realException.getMessage());
> return false;
> }
> return true;
> }
>
> /**
> * The worker method. It will find the container, create the
> * file if missing or just replace its contents, and open
> * the editor on the newly created file.
> */
>
> private void doFinish(
> String containerName,
> String fileName,
> IProgressMonitor monitor)
> throws CoreException {
> // create a sample file
> monitor.beginTask("Creating " + fileName, 2);
> IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
> IResource resource = root.findMember(new Path(containerName));
> if (!resource.exists() || !(resource instanceof IContainer)) {
> throwCoreException("Container \"" + containerName + "\" does not exist.");
> }
> IContainer container = (IContainer) resource;
> final IFile file = container.getFile(new Path(fileName));
> try {
> InputStream stream = openContentStream();
> if (file.exists()) {
> file.setContents(stream, true, true, monitor);
> } else {
> file.create(stream, true, monitor);
> }
> stream.close();
> } catch (IOException e) {
> }
> monitor.worked(1);
> monitor.setTaskName("Opening file for editing...");
> getShell().getDisplay().asyncExec(new Runnable() {
> public void run() {
> IWorkbenchPage page =
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage();
> try {
> page.openEditor(file);
> } catch (PartInitException e) {
> }
> }
> });
> monitor.worked(1);
> }
>
> /**
> * We will initialize file contents with a sample text.
> */
>
> private InputStream openContentStream() {
> String contents =
> "This is the initial file contents for *.mpe file that should be
word-sorted in the Preview page of the multi-page editor";
> return new ByteArrayInputStream(contents.getBytes());
> }
>
> private void throwCoreException(String message) throws CoreException {
> IStatus status =
> new Status(IStatus.ERROR, "com.slb.pk.JCDTProject.wizards", IStatus.OK,
message, null);
> throw new CoreException(status);
> }
>
>
> }
Previous Topic:Dirty marking in MultiPageEditorPart not removed after save
Next Topic:Could not find bootstrap code
Goto Forum:
  


Current Time: Sat Jul 12 18:33:29 EDT 2025

Powered by FUDForum. Page generated in 0.05985 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top