Bug 8536 - Bug on "Open type hierarchy"
Summary: Bug on "Open type hierarchy"
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 8484 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-01-26 10:47 EST by Genady Beryozkin CLA
Modified: 2002-01-28 12:12 EST (History)
1 user (show)

See Also:


Attachments
screenshot (17.18 KB, image/jpeg)
2002-01-26 10:48 EST, Genady Beryozkin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Genady Beryozkin CLA 2002-01-26 10:47:15 EST
I press "F4" to open the the type hierarchy and get the following error (only once):


Log: Sat Jan 26 17:47:46 IST 2002
1 org.eclipse.core.resources 4 Unhandled exception caught in event loop.
Log: Sat Jan 26 17:47:46 IST 2002
4 org.eclipse.ui 0 org.eclipse.jdt.internal.compiler.problem.AbortCompilationUnit
org.eclipse.jdt.internal.compiler.problem.AbortCompilationUnit
	at
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.abort(CompilationUnitDeclaration.java:55)
	at
org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:105)
	at
org.eclipse.jdt.internal.compiler.problem.ProblemReporter.handle(ProblemReporter.java:768)
	at
org.eclipse.jdt.internal.compiler.problem.ProblemReporter.isClassPathCorrect(ProblemReporter.java:1550)
	at
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.checkAndSetImports(CompilationUnitScope.java:155)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(LookupEnvironment.java:211)
	at
org.eclipse.jdt.internal.compiler.HierarchyResolver.accept(HierarchyResolver.java:158)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:71)
	at
org.eclipse.jdt.internal.compiler.HierarchyResolver.setFocusType(HierarchyResolver.java:489)
	at
org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.buildForProject(IndexBasedHierarchyBuilder.java:186)
	at
org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.buildFromPotentialSubtypes(IndexBasedHierarchyBuilder.java:280)
	at
org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.build(IndexBasedHierarchyBuilder.java:136)
	at
org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.compute(TypeHierarchy.java:249)
	at
org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.refresh(TypeHierarchy.java:1094)
	at
org.eclipse.jdt.internal.core.CreateTypeHierarchyOperation.executeOperation(CreateTypeHierarchyOperation.java:52)
	at
org.eclipse.jdt.internal.core.JavaModelOperation.execute(JavaModelOperation.java:268)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:476)
	at
org.eclipse.jdt.internal.core.JavaModelManager.runOperation(JavaModelManager.java:1133)
	at org.eclipse.jdt.internal.core.JavaElement.runOperation(JavaElement.java:526)
	at org.eclipse.jdt.internal.core.SourceType.newTypeHierarchy(SourceType.java:257)
	at
org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyLifeCycle.doHierarchyRefresh(TypeHierarchyLifeCycle.java:144)
	at
org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyLifeCycle.access$0(TypeHierarchyLifeCycle.java:129)
	at
org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyLifeCycle$1.run(TypeHierarchyLifeCycle.java:105)
	at
org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext$BusyRunnable.internalRun(BusyIndicatorRunnableContext.java:107)
	at
org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext$BusyRunnable.run(BusyIndicatorRunnableContext.java:74)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56)
	at
org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext.run(BusyIndicatorRunnableContext.java:120)
	at
org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyLifeCycle.ensureRefreshedTypeHierarchy(TypeHierarchyLifeCycle.java:113)
	at
org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart.updateInput(TypeHierarchyViewPart.java:369)
	at
org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart.setInputElement(TypeHierarchyViewPart.java:355)
	at
org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil.openInViewPart(OpenTypeHierarchyUtil.java:134)
	at
org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil.open(OpenTypeHierarchyUtil.java:109)
	at
org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil.open(OpenTypeHierarchyUtil.java:90)
	at
org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil.open(OpenTypeHierarchyUtil.java:84)
	at
org.eclipse.jdt.internal.ui.javaeditor.OpenHierarchyOnSelectionAction.open(OpenHierarchyOnSelectionAction.java:63)
	at
org.eclipse.jdt.internal.ui.javaeditor.OpenHierarchyOnSelectionAction.openOnEmptySelection(OpenHierarchyOnSelectionAction.java:72)
	at
org.eclipse.jdt.internal.ui.javaeditor.OpenOnSelectionAction.run(OpenOnSelectionAction.java:140)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:452)
	at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:407)
	at
org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:361)
	at
org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:352)
	at
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:47)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:74)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1413)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1205)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:844)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:827)
	at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:878)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:151)
	at org.eclipse.core.launcher.Main.run(Main.java:502)
	at org.eclipse.core.launcher.Main.main(Main.java:362)


------
The methods of the type appear in the hierarchy window but the type hierarchy
itself does not.

Here is the file I'm working on (from jython):

package org.apache.oro.text.regex;

/* ====================================================================
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 2000 The Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by the
 *        Apache Software Foundation (http://www.apache.org/)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
 *    must not be used to endorse or promote products derived from this
 *    software without prior written permission. For written
 *    permission, please contact apache@apache.org.
 *
 * 5. Products derived from this software may not be called "Apache" 
 *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
 *    name, without prior written permission of the Apache Software Foundation.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * <http://www.apache.org/>.
 *
 * Portions of this software are based upon software originally written 
 * by Daniel F. Savarese. We appreciate his contributions.
 */

import java.lang.*;

/**
 * A class used to signify the occurrence of a syntax error in a
 * regular expression that is being compiled.  The class is not
 * declared final so that it may be subclassed for identifying
 * more specific pattern comilation errors.  However, at this point
 * in time, this package does not subclass MalformedPatternException
 * for any purpose.  This does not preclude users and third party
 * implementors of the interfaces of this package from subclassing it
 * for their own purposes.

 @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
 @version $Id: MalformedPatternException.java,v 2.1 2000/10/13 19:53:10 bwarsaw
Exp $

 * @see PatternCompiler
 */
public class MalformedPatternException extends Exception {

  /**
   * Simply calls the corresponding constructor of its superclass.
   */
  public MalformedPatternException() {
    super();
  }

  /**
   * Simply calls the corresponding constructor of its superclass.
   * <p>
   * @param message  A message indicating the nature of the parse error.
   */
  public MalformedPatternException(String message) {
    super(message);
  }
}
Comment 1 Genady Beryozkin CLA 2002-01-26 10:48:39 EST
Created attachment 274 [details]
screenshot
Comment 2 Genady Beryozkin CLA 2002-01-26 10:49:37 EST
This is the result after pressing F4.
test1 is the object that was opened previously in the type hierarchy.

Comment 3 Genady Beryozkin CLA 2002-01-26 10:51:46 EST
Integration build 24Jan02
Comment 4 Genady Beryozkin CLA 2002-01-26 11:05:13 EST
Hmmm ... this appears to be not a java project.... just a java file in a simple
project. I used "add to workspace" ....
I added it as a java project and it is ok now.
Anyway, it should report a nicer error.
Comment 5 Philipe Mulet CLA 2002-01-27 09:33:26 EST
Agreed, this exception should be caught in a nicer way.
Comment 6 Jerome Lanneluc CLA 2002-01-28 12:09:25 EST
This can also happen in a Java project if java.lang.Object is not on the 
classpath.
Now catching the exception. User will see an incomplete hierarchy which will 
indicate that the classpath should be fixed.
Comment 7 Jerome Lanneluc CLA 2002-01-28 12:12:22 EST
*** Bug 8484 has been marked as a duplicate of this bug. ***