issue_id
int64 2.04k
425k
| title
stringlengths 9
251
| body
stringlengths 4
32.8k
⌀ | status
stringclasses 6
values | after_fix_sha
stringlengths 7
7
| project_name
stringclasses 6
values | repo_url
stringclasses 6
values | repo_name
stringclasses 6
values | language
stringclasses 1
value | issue_url
null | before_fix_sha
null | pull_url
null | commit_datetime
timestamp[us, tz=UTC] | report_datetime
timestamp[us, tz=UTC] | updated_file
stringlengths 23
187
| chunk_content
stringlengths 1
22k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/AllTypesSearchEngine.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.util;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.ITypeNameRequestor;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.ui.IJavaElementSearchConstants;
import org.eclipse.jface.operation.IRunnableContext;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.util.Assert;
/**
* Search for all types in the workspace. Instead of returning objects of type <code>IType</code>
* the methods of this class returns a list of the lightweight objects <code>TypeInfo</code>.
*/
public class AllTypesSearchEngine {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/AllTypesSearchEngine.java
|
private IWorkspace fWorkspace;
public AllTypesSearchEngine(IWorkspace workspace) {
Assert.isNotNull(workspace);
fWorkspace= workspace;
}
/**
* Search for type in the given search scope.
* @param style a combination of <code>IJavaElementSearchConstants</code> flags
*/
public List searchTypes(IRunnableContext context, final IJavaSearchScope scope, final int style) {
final List typesFound= new ArrayList(2000);
if (TypeCache.canReuse(style, scope)){
typesFound.addAll(TypeCache.getCachedTypes());
return typesFound;
}
IRunnableWithProgress runnable= new IRunnableWithProgress() {
public void run(IProgressMonitor pm) {
searchTypes(typesFound, scope, style, pm);
}
};
try {
context.run(true, true, runnable);
} catch (InvocationTargetException e) {
Throwable t= e.getTargetException();
if (t instanceof Error)
throw (Error)t;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/AllTypesSearchEngine.java
|
if (t instanceof RuntimeException)
throw (RuntimeException)t;
ExceptionHandler.handle(e, "Exception", "Unexpected exception. See log for details.");
} catch (InterruptedException e) {
}
return typesFound;
}
/**
* Search for type in the given search scope.
* @param style a combination of <code>IJavaElementSearchConstants</code> flags
*/
public void searchTypes(List typesFound, IJavaSearchScope scope, int style, IProgressMonitor pm) {
if (TypeCache.canReuse(style, scope)){
typesFound.addAll(TypeCache.getCachedTypes());
pm.done();
return;
}
TypeCache.flush();
TypeCache.setConfiguration(style);
doSearchTypes(typesFound, scope, style, pm);
TypeCache.setCachedTypes(createCopy(typesFound));
TypeCache.registerIfNecessary();
}
private static List createCopy(List list) {
List newList= new ArrayList(list.size());
newList.addAll(list);
return newList;
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/AllTypesSearchEngine.java
|
private void doSearchTypes(List typesFound, IJavaSearchScope scope, int style, IProgressMonitor pm) {
Assert.isTrue((style & IJavaElementSearchConstants.CONSIDER_TYPES) != 0);
try {
new SearchEngine().searchAllTypeNames(
fWorkspace,
null,
null,
IJavaSearchConstants.PATTERN_MATCH,
IJavaSearchConstants.CASE_INSENSITIVE,
computeKind(style),
scope,
new TypeInfoRequestor(typesFound),
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
pm);
} catch(JavaModelException e){
ExceptionHandler.handle(e, "Exception", "Unexpected exception. See log for details.");
}
}
private static int computeKind(int style) {
int kind= IJavaSearchConstants.INTERFACE;
if ((style & IJavaElementSearchConstants.CONSIDER_INTERFACES) != 0 && (style & IJavaElementSearchConstants.CONSIDER_CLASSES) != 0)
kind= IJavaSearchConstants.TYPE;
else if ((style & IJavaElementSearchConstants.CONSIDER_CLASSES) != 0)
kind= IJavaSearchConstants.CLASS;
return kind;
}
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TypeCache.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.util;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.IElementChangedListener;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaElementDelta;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.internal.core.search.JavaWorkspaceScope;
import org.eclipse.jdt.internal.ui.util.AllTypesSearchEngine;
import org.eclipse.jface.operation.IRunnableContext;
/**
* Cache used by AllTypesSeachEngine
*/
class TypeCache{
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TypeCache.java
|
private static int fgLastStyle= -1;
private static List fgTypeList;
private static boolean fgIsRegistered= false;
private TypeCache(){
}
static List getCachedTypes() {
if (fgTypeList == null)
return new ArrayList(0);
else
return fgTypeList;
}
static boolean canReuse(int style, IJavaSearchScope scope){
if (style != fgLastStyle)
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TypeCache.java
|
return false;
if (! (scope instanceof JavaWorkspaceScope))
return false;
if (fgTypeList == null)
return false;
if (fgTypeList.isEmpty())
return false;
return true;
}
static void flush(){
fgTypeList= null;
}
static void setConfiguration(int style){
fgLastStyle= style;
}
static void setCachedTypes(List types){
fgTypeList= types;
}
static void registerIfNecessary(){
if (fgIsRegistered)
return;
JavaCore.addElementChangedListener(new DeltaListener());
fgIsRegistered= true;
}
private static class DeltaListener implements IElementChangedListener {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TypeCache.java
|
public void elementChanged(ElementChangedEvent event) {
if (fgTypeList == null)
return;
IJavaElementDelta delta= event.getDelta();
IJavaElement element= delta.getElement();
int type= element.getElementType();
if (type == IJavaElement.CLASS_FILE)
return;
processDelta(delta);
}
private boolean mustFlush(IJavaElementDelta delta) {
if (delta.getKind() != IJavaElementDelta.CHANGED)
return true;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TypeCache.java
|
if (delta.getElement().getElementType() == IJavaElement.COMPILATION_UNIT)
return false;
if (delta.getFlags() != IJavaElementDelta.F_CHILDREN)
return true;
if (delta.getElement().getElementType() == IJavaElement.TYPE)
return false;
if ((delta.getAddedChildren() != null)
&& (delta.getAddedChildren().length != 0))
return true;
return false;
}
/*
* returns false iff list is flushed and we can stop processing
*/
private boolean processDelta(IJavaElementDelta delta) {
if (mustStopProcessing(delta))
return true;
if (mustFlush(delta)) {
flush();
return false;
}
IJavaElementDelta[] affectedChildren= delta.getAffectedChildren();
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TypeCache.java
|
if (affectedChildren == null)
return true;
for (int i= 0; i < affectedChildren.length; i++) {
if (!processDelta(affectedChildren[i]))
return false;
}
return true;
}
private static boolean mustStopProcessing(IJavaElementDelta delta) {
int type= delta.getElement().getElementType();
if (type == IJavaElement.CLASS_FILE)
return true;
if (type == IJavaElement.FIELD)
return true;
if (type == IJavaElement.METHOD)
return true;
if (type == IJavaElement.INITIALIZER)
return true;
if (type == IJavaElement.PACKAGE_DECLARATION)
return true;
if (type == IJavaElement.IMPORT_CONTAINER)
return true;
if (type == IJavaElement.IMPORT_DECLARATION)
return true;
return false;
}
}
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TypeInfo.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.util;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
public class TypeInfo {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TypeInfo.java
|
private final String fName;
private final String fPackage;
private final char[][] fEnclosingNames;
private final boolean fIsInterface;
private final String fPath;
private static final char SEPARATOR= '|';
public TypeInfo(char[] pkg, char[] name, char[][] enclosingTypes, String path, boolean isInterface) {
fPath= path;
fPackage= new String(pkg);
fName= new String(name);
fIsInterface= isInterface;
fEnclosingNames= enclosingTypes;
}
public String getTypeName() {
return fName;
}
public String getPackageName() {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TypeInfo.java
|
return fPackage;
}
/**
* Returns true iff the type info describes an interface.
*/
public boolean isInterface() {
return fIsInterface;
}
/**
* Gets the enclosing name (dot separated).
*/
public String getEnclosingName() {
StringBuffer buf= new StringBuffer();
for (int i= 0; i < fEnclosingNames.length; i++) {
if (i != 0) {
buf.append('.');
}
buf.append(fEnclosingNames[i]);
}
return buf.toString();
}
/**
* Gets the type qualified name: Includes enclosing type names, but
* not package name. Identifiers are separated by dots.
*/
public String getTypeQualifiedName() {
StringBuffer buf= new StringBuffer();
for (int i= 0; i < fEnclosingNames.length; i++) {
buf.append(fEnclosingNames[i]);
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TypeInfo.java
|
buf.append('.');
}
buf.append(fName);
return buf.toString();
}
/**
* Gets the fully qualified type name: Includes enclosing type names and
* package. All identifiers are separated by dots.
*/
public String getFullyQualifiedName() {
StringBuffer buf= new StringBuffer();
if (fPackage.length() > 0) {
buf.append(fPackage);
buf.append('.');
}
for (int i= 0; i < fEnclosingNames.length; i++) {
buf.append(fEnclosingNames[i]);
buf.append('.');
}
buf.append(fName);
return buf.toString();
}
/**
* Gets the fully qualified type container name: Package name or
* enclosing type name with package name.
* All identifiers are separated by dots.
*/
public String getTypeContainerName() {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TypeInfo.java
|
StringBuffer buf= new StringBuffer();
if (fPackage.length() > 0) {
buf.append(fPackage);
}
for (int i= 0; i < fEnclosingNames.length; i++) {
if (buf.length() > 0) {
buf.append('.');
}
buf.append(fEnclosingNames[i]);
}
return buf.toString();
}
/**
* Contructs the package fragment root name from the type ref path.
*/
public IPath getPackageFragmentRootPath() {
int index= fPath.indexOf(SEPARATOR);
if (index > 0) {
return new Path(fPath.substring(0, index));
} else {
int removeSegments= 1;
int packNameLen= fPackage.length();
if (packNameLen > 0) {
removeSegments++;
for (int i= 0; i < packNameLen; i++) {
if (fPackage.charAt(i) == '.')
removeSegments++;
}
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TypeInfo.java
|
return (new Path(fPath)).removeLastSegments(removeSegments);
}
}
/**
* Resolves the type in a scope if was searched for.
* The parent project of JAR files is the first project found in scope.
* Returns null if the type could not be resolved
*/
public IType resolveType(IJavaSearchScope scope) throws JavaModelException {
IJavaElement elem = getJavaElement(scope);
if (elem instanceof ICompilationUnit)
return JavaModelUtil.findTypeInCompilationUnit((ICompilationUnit)elem, getTypeQualifiedName());
else if (elem instanceof IClassFile)
return ((IClassFile)elem).getType();
return null;
}
private IJavaElement getJavaElement(IJavaSearchScope scope) throws JavaModelException {
IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
int index= fPath.indexOf(SEPARATOR);
if (index > 0)
return findJarInScope(root, scope, fPath.substring(0, index), new Path(fPath.substring(index + 1)));
else
return findInFile(root);
}
private IJavaElement findJarInScope(IWorkspaceRoot workspaceRoot, IJavaSearchScope scope, String jarPath, IPath elementPath) throws JavaModelException {
IJavaModel jmodel= JavaCore.create(workspaceRoot);
IPath[] enclosedPaths= scope.enclosingProjectsAndJars();
for (int i= 0; i < enclosedPaths.length; i++) {
IPath curr= enclosedPaths[i];
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TypeInfo.java
|
if (curr.segmentCount() == 1) {
IJavaProject jproject= jmodel.getJavaProject(curr.segment(0));
IPackageFragmentRoot root= jproject.getPackageFragmentRoot(jarPath);
if (root.exists())
return jproject.findElement(elementPath);
}
}
return null;
}
private IJavaElement findInFile(IWorkspaceRoot root) throws JavaModelException {
return JavaCore.create(root.findMember(new Path(fPath)));
}
/* non java-doc
* debugging only
*/
public String toString() {
StringBuffer buf= new StringBuffer();
buf.append("path= ");
buf.append(fPath);
buf.append("; pkg= ");
buf.append(fPackage);
buf.append("; enclosing= ");
buf.append(getEnclosingName());
buf.append("; name= ");
buf.append(fName);
return buf.toString();
}
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/SuperInterfaceSelectionDialog.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.wizards;
import java.util.List;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.operation.IRunnableContext;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.ui.IJavaElementSearchConstants;
import org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog;
import org.eclipse.jdt.internal.ui.util.TypeInfo;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField;
public class SuperInterfaceSelectionDialog extends TypeSelectionDialog {
private static final int ADD_ID= IDialogConstants.CLIENT_ID + 1;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/SuperInterfaceSelectionDialog.java
|
private ListDialogField fList;
private List fOldContent;
public SuperInterfaceSelectionDialog(Shell parent, IRunnableContext context, ListDialogField list, IJavaProject p) {
super(parent, context, createSearchScope(p), IJavaElementSearchConstants.CONSIDER_INTERFACES);
fList= list;
fOldContent= fList.getElements();
}
/*
* @see Dialog#createButtonsForButtonBar
*/
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, ADD_ID, NewWizardMessages.getString("SuperInterfaceSelectionDialog.addButton.label"), true);
super.createButtonsForButtonBar(parent);
}
/*
* @see Dialog#cancelPressed
*/
protected void cancelPressed() {
fList.setElements(fOldContent);
super.cancelPressed();
}
/*
* @see Dialog#buttonPressed
*/
protected void buttonPressed(int buttonId) {
if (buttonId == ADD_ID){
addSelectedInterface();
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/SuperInterfaceSelectionDialog.java
|
}
super.buttonPressed(buttonId);
}
/*
* @see Dialog#okPressed
*/
protected void okPressed() {
addSelectedInterface();
super.okPressed();
}
private void addSelectedInterface(){
Object ref= getLowerSelectedElement();
if (ref instanceof TypeInfo)
fList.addElement(((TypeInfo)ref).getFullyQualifiedName());
}
private static IJavaSearchScope createSearchScope(IJavaProject p) {
return SearchEngine.createJavaSearchScope(new IJavaProject[] { p });
}
/*
* @see AbstractElementListSelectionDialog#handleDefaultSelected()
*/
protected void handleDefaultSelected() {
if (validateCurrentSelection())
buttonPressed(ADD_ID);
}
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.wizards;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.IBuffer;
import org.eclipse.jdt.core.ICompilationUnit;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.ISourceRange;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.ITypeHierarchy;
import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.ui.IJavaElementSearchConstants;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.internal.compiler.env.IConstants;
import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
import org.eclipse.jdt.internal.corext.codemanipulation.IImportsStructure;
import org.eclipse.jdt.internal.corext.codemanipulation.ImportsStructure;
import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
import org.eclipse.jdt.internal.corext.template.ContextType;
import org.eclipse.jdt.internal.corext.template.ContextTypeRegistry;
import org.eclipse.jdt.internal.corext.template.Template;
import org.eclipse.jdt.internal.corext.template.TemplateBuffer;
import org.eclipse.jdt.internal.corext.template.Templates;
import org.eclipse.jdt.internal.corext.template.java.JavaContext;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
import org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.preferences.CodeGenerationPreferencePage;
import org.eclipse.jdt.internal.ui.preferences.ImportOrganizePreferencePage;
import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
import org.eclipse.jdt.internal.ui.util.SWTUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.SelectionButtonDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.SelectionButtonDialogFieldGroup;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.Separator;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonStatusDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField;
import org.eclipse.jdt.internal.ui.wizards.swt.MGridData;
import org.eclipse.jdt.internal.ui.wizards.swt.MGridLayout;
/**
* <code>TypePage</code> contains controls and validation routines for a 'New Type WizardPage'
* Implementors decide which components to add and to enable. Implementors can also
* customize the validation code.
* <code>TypePage</code> is intended to serve as base class of all wizards that create types.
* Applets, Servlets, Classes, Interfaces...
* See <code>NewClassCreationWizardPage</code> or <code>NewInterfaceCreationWizardPage</code> for an
* example usage of TypePage.
*/
public abstract class TypePage extends ContainerPage {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
private final static String PAGE_NAME= "TypePage";
protected final static String PACKAGE= PAGE_NAME + ".package";
protected final static String ENCLOSING= PAGE_NAME + ".enclosing";
protected final static String ENCLOSINGSELECTION= ENCLOSING + ".selection";
protected final static String TYPENAME= PAGE_NAME + ".typename";
protected final static String SUPER= PAGE_NAME + ".superclass";
protected final static String INTERFACES= PAGE_NAME + ".interfaces";
protected final static String MODIFIERS= PAGE_NAME + ".modifiers";
protected final static String METHODS= PAGE_NAME + ".methods";
private class InterfacesListLabelProvider extends LabelProvider {
private Image fInterfaceImage;
public InterfacesListLabelProvider() {
super();
fInterfaceImage= JavaPluginImages.get(JavaPluginImages.IMG_OBJS_INTERFACE);
}
public Image getImage(Object element) {
return fInterfaceImage;
}
}
private StringButtonStatusDialogField fPackageDialogField;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
private SelectionButtonDialogField fEnclosingTypeSelection;
private StringButtonDialogField fEnclosingTypeDialogField;
private boolean fCanModifyPackage;
private boolean fCanModifyEnclosingType;
private IPackageFragment fCurrPackage;
private IType fCurrEnclosingType;
private StringDialogField fTypeNameDialogField;
private StringButtonDialogField fSuperClassDialogField;
private ListDialogField fSuperInterfacesDialogField;
private IType fSuperClass;
private SelectionButtonDialogFieldGroup fAccMdfButtons;
private SelectionButtonDialogFieldGroup fOtherMdfButtons;
private IType fCreatedType;
protected IStatus fEnclosingTypeStatus;
protected IStatus fPackageStatus;
protected IStatus fTypeNameStatus;
protected IStatus fSuperClassStatus;
protected IStatus fModifierStatus;
protected IStatus fSuperInterfacesStatus;
private boolean fIsClass;
private int fStaticMdfIndex;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
private final int PUBLIC_INDEX= 0, DEFAULT_INDEX= 1, PRIVATE_INDEX= 2, PROTECTED_INDEX= 3;
private final int ABSTRACT_INDEX= 0, FINAL_INDEX= 1;
public TypePage(boolean isClass, String pageName, IWorkspaceRoot root) {
super(pageName, root);
fCreatedType= null;
fIsClass= isClass;
TypeFieldsAdapter adapter= new TypeFieldsAdapter();
fPackageDialogField= new StringButtonStatusDialogField(adapter);
fPackageDialogField.setDialogFieldListener(adapter);
fPackageDialogField.setLabelText(NewWizardMessages.getString("TypePage.package.label"));
fPackageDialogField.setButtonLabel(NewWizardMessages.getString("TypePage.package.button"));
fPackageDialogField.setStatusWidthHint(NewWizardMessages.getString("TypePage.default"));
fEnclosingTypeSelection= new SelectionButtonDialogField(SWT.CHECK);
fEnclosingTypeSelection.setDialogFieldListener(adapter);
fEnclosingTypeSelection.setLabelText(NewWizardMessages.getString("TypePage.enclosing.selection.label"));
fEnclosingTypeDialogField= new StringButtonDialogField(adapter);
fEnclosingTypeDialogField.setDialogFieldListener(adapter);
fEnclosingTypeDialogField.setButtonLabel(NewWizardMessages.getString("TypePage.enclosing.button"));
fTypeNameDialogField= new StringDialogField();
fTypeNameDialogField.setDialogFieldListener(adapter);
fTypeNameDialogField.setLabelText(NewWizardMessages.getString("TypePage.typename.label"));
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
fSuperClassDialogField= new StringButtonDialogField(adapter);
fSuperClassDialogField.setDialogFieldListener(adapter);
fSuperClassDialogField.setLabelText(NewWizardMessages.getString("TypePage.superclass.label"));
fSuperClassDialogField.setButtonLabel(NewWizardMessages.getString("TypePage.superclass.button"));
String[] addButtons= new String[] {
NewWizardMessages.getString("TypePage.interfaces.add"),
null,
NewWizardMessages.getString("TypePage.interfaces.remove")
};
fSuperInterfacesDialogField= new ListDialogField(adapter, addButtons, new InterfacesListLabelProvider());
fSuperInterfacesDialogField.setDialogFieldListener(adapter);
String interfaceLabel= fIsClass ? NewWizardMessages.getString("TypePage.interfaces.class.label") : NewWizardMessages.getString("TypePage.interfaces.ifc.label");
fSuperInterfacesDialogField.setLabelText(interfaceLabel);
fSuperInterfacesDialogField.setRemoveButtonIndex(2);
String[] buttonNames1= new String[] {
NewWizardMessages.getString("TypePage.modifiers.public"),
NewWizardMessages.getString("TypePage.modifiers.default"),
NewWizardMessages.getString("TypePage.modifiers.private"),
NewWizardMessages.getString("TypePage.modifiers.protected")
};
fAccMdfButtons= new SelectionButtonDialogFieldGroup(SWT.RADIO, buttonNames1, 4);
fAccMdfButtons.setDialogFieldListener(adapter);
fAccMdfButtons.setLabelText(NewWizardMessages.getString("TypePage.modifiers.acc.label"));
fAccMdfButtons.setSelection(0, true);
String[] buttonNames2;
if (fIsClass) {
buttonNames2= new String[] {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
NewWizardMessages.getString("TypePage.modifiers.abstract"),
NewWizardMessages.getString("TypePage.modifiers.final"),
NewWizardMessages.getString("TypePage.modifiers.static")
};
fStaticMdfIndex= 2;
} else {
buttonNames2= new String[] {
NewWizardMessages.getString("TypePage.modifiers.static")
};
fStaticMdfIndex= 0;
}
fOtherMdfButtons= new SelectionButtonDialogFieldGroup(SWT.CHECK, buttonNames2, 4);
fOtherMdfButtons.setDialogFieldListener(adapter);
fAccMdfButtons.enableSelectionButton(PRIVATE_INDEX, false);
fAccMdfButtons.enableSelectionButton(PROTECTED_INDEX, false);
fOtherMdfButtons.enableSelectionButton(fStaticMdfIndex, false);
fPackageStatus= new StatusInfo();
fEnclosingTypeStatus= new StatusInfo();
fCanModifyPackage= true;
fCanModifyEnclosingType= true;
updateEnableState();
fTypeNameStatus= new StatusInfo();
fSuperClassStatus= new StatusInfo();
fSuperInterfacesStatus= new StatusInfo();
fModifierStatus= new StatusInfo();
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
/**
* Initializes all fields provided by the type page with a given
* Java element as selection.
* @param elem The initial selection of this page or null if no
* selection was available
*/
protected void initTypePage(IJavaElement elem) {
String initSuperclass= "java.lang.Object";
ArrayList initSuperinterfaces= new ArrayList(5);
IPackageFragment pack= null;
IType enclosingType= null;
if (elem != null) {
pack= (IPackageFragment) JavaModelUtil.findElementOfKind(elem, IJavaElement.PACKAGE_FRAGMENT);
IType typeInCU= (IType) JavaModelUtil.findElementOfKind(elem, IJavaElement.TYPE);
if (typeInCU != null) {
if (typeInCU.getCompilationUnit() != null) {
enclosingType= typeInCU;
}
} else {
ICompilationUnit cu= (ICompilationUnit) JavaModelUtil.findElementOfKind(elem, IJavaElement.COMPILATION_UNIT);
if (cu != null) {
enclosingType= JavaModelUtil.findPrimaryType(cu);
}
}
try {
IType type= null;
if (elem.getElementType() == IJavaElement.TYPE) {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
type= (IType)elem;
if (type.exists()) {
String superName= JavaModelUtil.getFullyQualifiedName(type);
if (type.isInterface()) {
initSuperinterfaces.add(superName);
} else {
initSuperclass= superName;
}
}
}
} catch (JavaModelException e) {
JavaPlugin.log(e.getStatus());
}
}
setPackageFragment(pack, true);
setEnclosingType(enclosingType, true);
setEnclosingTypeSelection(false, true);
setTypeName("", true);
setSuperClass(initSuperclass, true);
setSuperInterfaces(initSuperinterfaces, true);
}
/**
* Creates a separator line.
* @param composite The parent composite
* @param nColumns Number of columns to span
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
*/
protected void createSeparator(Composite composite, int nColumns) {
(new Separator(SWT.SEPARATOR | SWT.HORIZONTAL)).doFillIntoGrid(composite, nColumns, convertHeightInCharsToPixels(1));
}
/**
* Creates the controls for the package name field.
* @param composite The parent composite
* @param nColumns Number of columns to span
*/
protected void createPackageControls(Composite composite, int nColumns) {
fPackageDialogField.doFillIntoGrid(composite, 4);
LayoutUtil.setWidthHint(fPackageDialogField.getTextControl(null), getMaxFieldWidth());
}
/**
* Creates the controls for the enclosing type name field.
* @param composite The parent composite
* @param nColumns Number of columns to span
*/
protected void createEnclosingTypeControls(Composite composite, int nColumns) {
Composite tabGroup= new Composite(composite, SWT.NONE);
MGridLayout layout= new MGridLayout();
layout.marginWidth= 0;
layout.marginHeight= 0;
tabGroup.setLayout(layout);
fEnclosingTypeSelection.doFillIntoGrid(tabGroup, 1);
Control c= fEnclosingTypeDialogField.getTextControl(composite);
MGridData gd= new MGridData(MGridData.FILL_HORIZONTAL);
gd.widthHint= getMaxFieldWidth();
gd.horizontalSpan= 2;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
c.setLayoutData(gd);
Button button= fEnclosingTypeDialogField.getChangeControl(composite);
gd= new MGridData(MGridData.HORIZONTAL_ALIGN_FILL);
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
gd.widthHint = SWTUtil.getButtonWidthHint(button);
button.setLayoutData(gd);
}
/**
* Creates the controls for the type name field.
* @param composite The parent composite
* @param nColumns Number of columns to span
*/
protected void createTypeNameControls(Composite composite, int nColumns) {
fTypeNameDialogField.doFillIntoGrid(composite, nColumns - 1);
DialogField.createEmptySpace(composite);
LayoutUtil.setWidthHint(fTypeNameDialogField.getTextControl(null), getMaxFieldWidth());
}
/**
* Creates the controls for the modifiers radio/ceckbox buttons.
* @param composite The parent composite
* @param nColumns Number of columns to span
*/
protected void createModifierControls(Composite composite, int nColumns) {
LayoutUtil.setHorizontalSpan(fAccMdfButtons.getLabelControl(composite), 1);
Control control= fAccMdfButtons.getSelectionButtonsGroup(composite);
MGridData gd= new MGridData(MGridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan= nColumns - 2;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
control.setLayoutData(gd);
DialogField.createEmptySpace(composite);
DialogField.createEmptySpace(composite);
control= fOtherMdfButtons.getSelectionButtonsGroup(composite);
gd= new MGridData(MGridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan= nColumns - 2;
control.setLayoutData(gd);
DialogField.createEmptySpace(composite);
}
/**
* Creates the controls for the superclass name field.
* @param composite The parent composite
* @param nColumns Number of columns to span
*/
protected void createSuperClassControls(Composite composite, int nColumns) {
fSuperClassDialogField.doFillIntoGrid(composite, nColumns);
LayoutUtil.setWidthHint(fSuperClassDialogField.getTextControl(null), getMaxFieldWidth());
}
/**
* Creates the controls for the superclass name field.
* @param composite The parent composite
* @param nColumns Number of columns to span
*/
protected void createSuperInterfacesControls(Composite composite, int nColumns) {
fSuperInterfacesDialogField.doFillIntoGrid(composite, nColumns);
MGridData gd= (MGridData)fSuperInterfacesDialogField.getListControl(null).getLayoutData();
if (fIsClass) {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
gd.heightHint= convertHeightInCharsToPixels(3);
} else {
gd.heightHint= convertHeightInCharsToPixels(6);
}
gd.grabExcessVerticalSpace= false;
gd.widthHint= getMaxFieldWidth();
}
/**
* Sets the focus on the container if empty, elso on type name.
*/
protected void setFocus() {
fTypeNameDialogField.setFocus();
}
private class TypeFieldsAdapter implements IStringButtonAdapter, IDialogFieldListener, IListAdapter {
public void changeControlPressed(DialogField field) {
typePageChangeControlPressed(field);
}
public void customButtonPressed(DialogField field, int index) {
typePageCustomButtonPressed(field, index);
}
public void selectionChanged(DialogField field) {}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
public void dialogFieldChanged(DialogField field) {
typePageDialogFieldChanged(field);
}
}
private void typePageChangeControlPressed(DialogField field) {
if (field == fPackageDialogField) {
IPackageFragment pack= choosePackage();
if (pack != null) {
fPackageDialogField.setText(pack.getElementName());
}
} else if (field == fEnclosingTypeDialogField) {
IType type= chooseEnclosingType();
if (type != null) {
fEnclosingTypeDialogField.setText(JavaModelUtil.getFullyQualifiedName(type));
}
} else if (field == fSuperClassDialogField) {
IType type= chooseSuperType();
if (type != null) {
fSuperClassDialogField.setText(JavaModelUtil.getFullyQualifiedName(type));
}
}
}
private void typePageCustomButtonPressed(DialogField field, int index) {
if (field == fSuperInterfacesDialogField) {
chooseSuperInterfaces();
}
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
/*
* A field on the type has changed. The fields' status and all dependend
* status are updated.
*/
private void typePageDialogFieldChanged(DialogField field) {
String fieldName= null;
if (field == fPackageDialogField) {
fPackageStatus= packageChanged();
updatePackageStatusLabel();
fTypeNameStatus= typeNameChanged();
fSuperClassStatus= superClassChanged();
fieldName= PACKAGE;
} else if (field == fEnclosingTypeDialogField) {
fEnclosingTypeStatus= enclosingTypeChanged();
fTypeNameStatus= typeNameChanged();
fSuperClassStatus= superClassChanged();
fieldName= ENCLOSING;
} else if (field == fEnclosingTypeSelection) {
updateEnableState();
boolean isEnclosedType= isEnclosingTypeSelected();
if (!isEnclosedType) {
if (fAccMdfButtons.isSelected(PRIVATE_INDEX) || fAccMdfButtons.isSelected(PROTECTED_INDEX)) {
fAccMdfButtons.setSelection(PRIVATE_INDEX, false);
fAccMdfButtons.setSelection(PROTECTED_INDEX, false);
fAccMdfButtons.setSelection(PUBLIC_INDEX, true);
}
if (fOtherMdfButtons.isSelected(fStaticMdfIndex)) {
fOtherMdfButtons.setSelection(fStaticMdfIndex, false);
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
}
fAccMdfButtons.enableSelectionButton(PRIVATE_INDEX, isEnclosedType && fIsClass);
fAccMdfButtons.enableSelectionButton(PROTECTED_INDEX, isEnclosedType && fIsClass);
fOtherMdfButtons.enableSelectionButton(fStaticMdfIndex, isEnclosedType);
fTypeNameStatus= typeNameChanged();
fSuperClassStatus= superClassChanged();
fieldName= ENCLOSINGSELECTION;
} else if (field == fTypeNameDialogField) {
fTypeNameStatus= typeNameChanged();
fieldName= TYPENAME;
} else if (field == fSuperClassDialogField) {
fSuperClassStatus= superClassChanged();
fieldName= SUPER;
} else if (field == fSuperInterfacesDialogField) {
fSuperInterfacesStatus= superInterfacesChanged();
fieldName= INTERFACES;
} else if (field == fOtherMdfButtons) {
fModifierStatus= modifiersChanged();
fieldName= MODIFIERS;
} else {
fieldName= METHODS;
}
handleFieldChanged(fieldName);
}
/**
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
* Called whenever a content of a field has changed.
* Implementors of TypePage can hook in.
* @see ContainerPage#handleFieldChanged
*/
protected void handleFieldChanged(String fieldName) {
super.handleFieldChanged(fieldName);
if (fieldName == CONTAINER) {
fPackageStatus= packageChanged();
fEnclosingTypeStatus= enclosingTypeChanged();
fTypeNameStatus= typeNameChanged();
fSuperClassStatus= superClassChanged();
fSuperInterfacesStatus= superInterfacesChanged();
}
}
/**
* Gets the text of package field.
*/
public String getPackageText() {
return fPackageDialogField.getText();
}
/**
* Gets the text of enclosing type field.
*/
public String getEnclosingTypeText() {
return fEnclosingTypeDialogField.getText();
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
/**
* Returns the package fragment corresponding to the current input.
* @return Returns <code>null</code> if the input could not be resolved.
*/
public IPackageFragment getPackageFragment() {
if (!isEnclosingTypeSelected()) {
return fCurrPackage;
} else {
if (fCurrEnclosingType != null) {
return fCurrEnclosingType.getPackageFragment();
}
}
return null;
}
/**
* Sets the package fragment.
* This will update model and the text of the control.
* @param canBeModified Selects if the package fragment can be changed by the user
*/
public void setPackageFragment(IPackageFragment pack, boolean canBeModified) {
fCurrPackage= pack;
fCanModifyPackage= canBeModified;
String str= (pack == null) ? "" : pack.getElementName();
fPackageDialogField.setText(str);
updateEnableState();
}
/**
* Returns the encloding type corresponding to the current input.
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
* @return Returns <code>null</code> if enclosing type is not selected or the input could not
* be resolved.
*/
public IType getEnclosingType() {
if (isEnclosingTypeSelected()) {
return fCurrEnclosingType;
}
return null;
}
/**
* Sets the package fragment.
* This will update model and the text of the control.
* @param canBeModified Selects if the enclosing type can be changed by the user
*/
public void setEnclosingType(IType type, boolean canBeModified) {
fCurrEnclosingType= type;
fCanModifyEnclosingType= canBeModified;
String str= (type == null) ? "" : JavaModelUtil.getFullyQualifiedName(type);
fEnclosingTypeDialogField.setText(str);
updateEnableState();
}
/**
* Returns <code>true</code> if the enclosing type selection check box is enabled.
*/
public boolean isEnclosingTypeSelected() {
return fEnclosingTypeSelection.isSelected();
}
/**
* Sets the enclosing type selection checkbox.
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
* @param canBeModified Selects if the enclosing type selection can be changed by the user
*/
public void setEnclosingTypeSelection(boolean isSelected, boolean canBeModified) {
fEnclosingTypeSelection.setSelection(isSelected);
fEnclosingTypeSelection.setEnabled(canBeModified);
updateEnableState();
}
/**
* Gets the type name.
*/
public String getTypeName() {
return fTypeNameDialogField.getText();
}
/**
* Sets the type name.
* @param canBeModified Selects if the type name can be changed by the user
*/
public void setTypeName(String name, boolean canBeModified) {
fTypeNameDialogField.setText(name);
fTypeNameDialogField.setEnabled(canBeModified);
}
/**
* Gets the selected modifiers.
* @see Flags
*/
public int getModifiers() {
int mdf= 0;
if (fAccMdfButtons.isSelected(PUBLIC_INDEX)) {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
mdf+= IConstants.AccPublic;
} else if (fAccMdfButtons.isSelected(PRIVATE_INDEX)) {
mdf+= IConstants.AccPrivate;
} else if (fAccMdfButtons.isSelected(PROTECTED_INDEX)) {
mdf+= IConstants.AccProtected;
}
if (fOtherMdfButtons.isSelected(ABSTRACT_INDEX) && (fStaticMdfIndex != 0)) {
mdf+= IConstants.AccAbstract;
}
if (fOtherMdfButtons.isSelected(FINAL_INDEX)) {
mdf+= IConstants.AccFinal;
}
if (fOtherMdfButtons.isSelected(fStaticMdfIndex)) {
mdf+= IConstants.AccStatic;
}
return mdf;
}
/**
* Sets the modifiers.
* @param canBeModified Selects if the modifiers can be changed by the user
* @see IConstants
*/
public void setModifiers(int modifiers, boolean canBeModified) {
if (Flags.isPublic(modifiers)) {
fAccMdfButtons.setSelection(PUBLIC_INDEX, true);
} else if (Flags.isPrivate(modifiers)) {
fAccMdfButtons.setSelection(PRIVATE_INDEX, true);
} else if (Flags.isProtected(modifiers)) {
fAccMdfButtons.setSelection(PROTECTED_INDEX, true);
} else {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
fAccMdfButtons.setSelection(DEFAULT_INDEX, true);
}
if (Flags.isAbstract(modifiers)) {
fOtherMdfButtons.setSelection(ABSTRACT_INDEX, true);
}
if (Flags.isFinal(modifiers)) {
fOtherMdfButtons.setSelection(FINAL_INDEX, true);
}
if (Flags.isStatic(modifiers)) {
fOtherMdfButtons.setSelection(fStaticMdfIndex, true);
}
fAccMdfButtons.setEnabled(canBeModified);
fOtherMdfButtons.setEnabled(canBeModified);
}
/**
* Gets the content of the super class text field.
*/
public String getSuperClass() {
return fSuperClassDialogField.getText();
}
/**
* Sets the super class name.
* @param canBeModified Selects if the super class can be changed by the user
*/
public void setSuperClass(String name, boolean canBeModified) {
fSuperClassDialogField.setText(name);
fSuperClassDialogField.setEnabled(canBeModified);
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
/**
* Gets the currently chosen super interfaces.
* @return returns a list of String
*/
public List getSuperInterfaces() {
return fSuperInterfacesDialogField.getElements();
}
/**
* Sets the super interfaces.
* @param interfacesNames a list of String
*/
public void setSuperInterfaces(List interfacesNames, boolean canBeModified) {
fSuperInterfacesDialogField.setElements(interfacesNames);
fSuperInterfacesDialogField.setEnabled(canBeModified);
}
/**
* Called when the package field has changed.
* The method validates the package name and returns the status of the validation
* This also updates the package fragment model.
* Can be extended to add more validation
*/
protected IStatus packageChanged() {
StatusInfo status= new StatusInfo();
fPackageDialogField.enableButton(getPackageFragmentRoot() != null);
String packName= getPackageText();
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
if (packName.length() > 0) {
IStatus val= JavaConventions.validatePackageName(packName);
if (val.getSeverity() == IStatus.ERROR) {
status.setError(NewWizardMessages.getFormattedString("TypePage.error.InvalidPackageName", val.getMessage()));
return status;
} else if (val.getSeverity() == IStatus.WARNING) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.DiscouragedPackageName", val.getMessage()));
}
}
IPackageFragmentRoot root= getPackageFragmentRoot();
if (root != null) {
IPackageFragment pack= root.getPackageFragment(packName);
try {
IPath rootPath= root.getPath();
IPath outputPath= root.getJavaProject().getOutputLocation();
if (rootPath.isPrefixOf(outputPath) && !rootPath.equals(outputPath)) {
IPath packagePath= pack.getUnderlyingResource().getFullPath();
if (outputPath.isPrefixOf(packagePath)) {
status.setError(NewWizardMessages.getString("TypePage.error.ClashOutputLocation"));
return status;
}
}
} catch (JavaModelException e) {
JavaPlugin.log(e.getStatus());
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
fCurrPackage= pack;
} else {
status.setError("");
}
return status;
}
/*
* Updates the 'default' label next to the package field.
*/
private void updatePackageStatusLabel() {
String packName= fPackageDialogField.getText();
if (packName.length() == 0) {
fPackageDialogField.setStatus(NewWizardMessages.getString("TypePage.default"));
} else {
fPackageDialogField.setStatus("");
}
}
/*
* Updates the enable state of buttons related to the enclosing type selection checkbox.
*/
private void updateEnableState() {
boolean enclosing= isEnclosingTypeSelected();
fPackageDialogField.setEnabled(fCanModifyPackage && !enclosing);
fEnclosingTypeDialogField.setEnabled(fCanModifyEnclosingType && enclosing);
}
/**
* Called when the enclosing type name has changed.
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
* The method validates the enclosing type and returns the status of the validation
* This also updates the enclosing type model.
* Can be extended to add more validation
*/
protected IStatus enclosingTypeChanged() {
StatusInfo status= new StatusInfo();
fCurrEnclosingType= null;
IPackageFragmentRoot root= getPackageFragmentRoot();
fEnclosingTypeDialogField.enableButton(root != null);
if (root == null) {
status.setError("");
return status;
}
String enclName= getEnclosingTypeText();
if (enclName.length() == 0) {
status.setError(NewWizardMessages.getString("TypePage.error.EnclosingTypeEnterName"));
return status;
}
try {
IType type= JavaModelUtil.findType(root.getJavaProject(), enclName);
if (type == null) {
status.setError(NewWizardMessages.getString("TypePage.error.EnclosingTypeNotExists"));
return status;
}
if (type.getCompilationUnit() == null) {
status.setError(NewWizardMessages.getString("TypePage.error.EnclosingNotInCU"));
return status;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
}
fCurrEnclosingType= type;
IPackageFragmentRoot enclosingRoot= JavaModelUtil.getPackageFragmentRoot(type);
if (!enclosingRoot.equals(root)) {
status.setWarning(NewWizardMessages.getString("TypePage.warning.EnclosingNotInSourceFolder"));
}
return status;
} catch (JavaModelException e) {
status.setError(NewWizardMessages.getString("TypePage.error.EnclosingTypeNotExists"));
JavaPlugin.log(e.getStatus());
return status;
}
}
/**
* Called when the type name has changed.
* The method validates the type name and returns the status of the validation.
* Can be extended to add more validation
*/
protected IStatus typeNameChanged() {
StatusInfo status= new StatusInfo();
String typeName= getTypeName();
if (typeName.length() == 0) {
status.setError(NewWizardMessages.getString("TypePage.error.EnterTypeName"));
return status;
}
if (typeName.indexOf('.') != -1) {
status.setError(NewWizardMessages.getString("TypePage.error.QualifiedName"));
return status;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
}
IStatus val= JavaConventions.validateJavaTypeName(typeName);
if (val.getSeverity() == IStatus.ERROR) {
status.setError(NewWizardMessages.getFormattedString("TypePage.error.InvalidTypeName", val.getMessage()));
return status;
} else if (val.getSeverity() == IStatus.WARNING) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.TypeNameDiscouraged", val.getMessage()));
}
if (!isEnclosingTypeSelected()) {
IPackageFragment pack= getPackageFragment();
if (pack != null) {
ICompilationUnit cu= pack.getCompilationUnit(typeName + ".java");
if (cu.exists()) {
status.setError(NewWizardMessages.getString("TypePage.error.TypeNameExists"));
return status;
}
}
} else {
IType type= getEnclosingType();
if (type != null) {
IType member= type.getType(typeName);
if (member.exists()) {
status.setError(NewWizardMessages.getString("TypePage.error.TypeNameExists"));
return status;
}
}
}
return status;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
}
/**
* Called when the superclass name has changed.
* The method validates the superclass name and returns the status of the validation.
* Can be extended to add more validation
*/
protected IStatus superClassChanged() {
StatusInfo status= new StatusInfo();
IPackageFragmentRoot root= getPackageFragmentRoot();
fSuperClassDialogField.enableButton(root != null);
fSuperClass= null;
String sclassName= getSuperClass();
if (sclassName.length() == 0) {
return status;
}
IStatus val= JavaConventions.validateJavaTypeName(sclassName);
if (!val.isOK()) {
status.setError(NewWizardMessages.getString("TypePage.error.InvalidSuperClassName"));
return status;
}
if (root != null) {
try {
IType type= resolveSuperTypeName(root.getJavaProject(), sclassName);
if (type == null) {
status.setWarning(NewWizardMessages.getString("TypePage.warning.SuperClassNotExists"));
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
return status;
} else {
if (type.isInterface()) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.SuperClassIsNotClass", sclassName));
return status;
}
int flags= type.getFlags();
if (Flags.isFinal(flags)) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.SuperClassIsFinal", sclassName));
return status;
} else if (!JavaModelUtil.isVisible(type, getPackageFragment())) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.SuperClassIsNotVisible", sclassName));
return status;
}
}
fSuperClass= type;
} catch (JavaModelException e) {
status.setError(NewWizardMessages.getString("TypePage.error.InvalidSuperClassName"));
JavaPlugin.log(e.getStatus());
}
} else {
status.setError("");
}
return status;
}
private IType resolveSuperTypeName(IJavaProject jproject, String sclassName) throws JavaModelException {
IType type= null;
if (isEnclosingTypeSelected()) {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
IType enclosingType= getEnclosingType();
if (enclosingType != null) {
String[][] res= enclosingType.resolveType(sclassName);
if (res != null && res.length > 0) {
type= JavaModelUtil.findType(jproject, res[0][0], res[0][1]);
}
}
} else {
IPackageFragment currPack= getPackageFragment();
if (type == null && currPack != null) {
String packName= currPack.getElementName();
if (!currPack.isDefaultPackage()) {
type= JavaModelUtil.findType(jproject, packName, sclassName);
}
if (type == null && !"java.lang".equals(packName)) {
type= JavaModelUtil.findType(jproject, "java.lang", sclassName);
}
}
if (type == null) {
type= JavaModelUtil.findType(jproject, sclassName);
}
}
return type;
}
/**
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
* Called when the list of super interface has changed.
* The method validates the superinterfaces and returns the status of the validation.
* Can be extended to add more validation.
*/
protected IStatus superInterfacesChanged() {
StatusInfo status= new StatusInfo();
IPackageFragmentRoot root= getPackageFragmentRoot();
fSuperInterfacesDialogField.enableButton(0, root != null);
if (root != null) {
List elements= fSuperInterfacesDialogField.getElements();
int nElements= elements.size();
for (int i= 0; i < nElements; i++) {
String intfname= (String)elements.get(i);
try {
IType type= JavaModelUtil.findType(root.getJavaProject(), intfname);
if (type == null) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.InterfaceNotExists", intfname));
return status;
} else {
if (type.isClass()) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.InterfaceIsNotInterface", intfname));
return status;
}
if (!JavaModelUtil.isVisible(type, getPackageFragment())) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.InterfaceIsNotVisible", intfname));
return status;
}
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
} catch (JavaModelException e) {
JavaPlugin.log(e.getStatus());
}
}
}
return status;
}
/**
* Called when the modifiers have changed.
* The method validates the modifiers and returns the status of the validation.
* Can be extended to add more validation.
*/
protected IStatus modifiersChanged() {
StatusInfo status= new StatusInfo();
int modifiers= getModifiers();
if (Flags.isFinal(modifiers) && Flags.isAbstract(modifiers)) {
status.setError(NewWizardMessages.getString("TypePage.error.ModifiersFinalAndAbstract"));
}
return status;
}
private IPackageFragment choosePackage() {
IPackageFragmentRoot froot= getPackageFragmentRoot();
IJavaElement[] packages= null;
try {
if (froot != null) {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
packages= froot.getChildren();
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
if (packages == null) {
packages= new IJavaElement[0];
}
ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT));
dialog.setIgnoreCase(false);
dialog.setTitle(NewWizardMessages.getString("TypePage.ChoosePackageDialog.title"));
dialog.setMessage(NewWizardMessages.getString("TypePage.ChoosePackageDialog.description"));
dialog.setEmptyListMessage(NewWizardMessages.getString("TypePage.ChoosePackageDialog.empty"));
dialog.setElements(packages);
if (fCurrPackage != null) {
dialog.setInitialSelections(new Object[] { fCurrPackage });
}
if (dialog.open() == dialog.OK) {
return (IPackageFragment) dialog.getFirstResult();
}
return null;
}
private IType chooseEnclosingType() {
IPackageFragmentRoot root= getPackageFragmentRoot();
if (root == null) {
return null;
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
IJavaSearchScope scope= SearchEngine.createJavaSearchScope(new IJavaElement[] { root });
TypeSelectionDialog dialog= new TypeSelectionDialog(getShell(), getWizard().getContainer(), scope, IJavaElementSearchConstants.CONSIDER_TYPES);
dialog.setTitle(NewWizardMessages.getString("TypePage.ChooseEnclosingTypeDialog.title"));
dialog.setMessage(NewWizardMessages.getString("TypePage.ChooseEnclosingTypeDialog.description"));
if (fCurrEnclosingType != null) {
dialog.setInitialSelections(new Object[] { fCurrEnclosingType });
dialog.setFilter(fCurrEnclosingType.getElementName().substring(0, 1));
}
if (dialog.open() == dialog.OK) {
return (IType) dialog.getFirstResult();
}
return null;
}
private IType chooseSuperType() {
IPackageFragmentRoot root= getPackageFragmentRoot();
if (root == null) {
return null;
}
IJavaElement[] elements= new IJavaElement[] { root.getJavaProject() };
IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements);
TypeSelectionDialog dialog= new TypeSelectionDialog(getShell(), getWizard().getContainer(), scope, IJavaElementSearchConstants.CONSIDER_CLASSES);
dialog.setTitle(NewWizardMessages.getString("TypePage.SuperClassDialog.title"));
dialog.setMessage(NewWizardMessages.getString("TypePage.SuperClassDialog.message"));
if (fSuperClass != null) {
dialog.setFilter(fSuperClass.getElementName());
}
if (dialog.open() == dialog.OK) {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
return (IType) dialog.getFirstResult();
}
return null;
}
private void chooseSuperInterfaces() {
IPackageFragmentRoot root= getPackageFragmentRoot();
if (root == null) {
return;
}
IJavaProject project= root.getJavaProject();
SuperInterfaceSelectionDialog dialog= new SuperInterfaceSelectionDialog(getShell(), getWizard().getContainer(), fSuperInterfacesDialogField, project);
dialog.setTitle(NewWizardMessages.getString("TypePage.InterfacesDialog.title"));
dialog.setMessage(NewWizardMessages.getString("TypePage.InterfacesDialog.message"));
dialog.open();
return;
}
/**
* Creates a type using the current field values.
*/
public void createType(IProgressMonitor monitor) throws CoreException, InterruptedException {
monitor.beginTask(NewWizardMessages.getString("TypePage.operationdesc"), 10);
IPackageFragmentRoot root= getPackageFragmentRoot();
IPackageFragment pack= getPackageFragment();
if (pack == null) {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
pack= root.getPackageFragment("");
}
if (!pack.exists()) {
String packName= pack.getElementName();
pack= root.createPackageFragment(packName, true, null);
}
monitor.worked(1);
String clName= fTypeNameDialogField.getText();
boolean isInnerClass= isEnclosingTypeSelected();
IType createdType;
ImportsStructure imports;
int indent= 0;
String[] prefOrder= ImportOrganizePreferencePage.getImportOrderPreference();
int threshold= ImportOrganizePreferencePage.getImportNumberThreshold();
String lineDelimiter= null;
if (!isInnerClass) {
ICompilationUnit parentCU= pack.getCompilationUnit(clName + ".java");
imports= new ImportsStructure(parentCU, prefOrder, threshold, false);
lineDelimiter= StubUtility.getLineDelimiterUsed(parentCU);
String content= createTypeBody(imports, lineDelimiter, parentCU);
createdType= parentCU.createType(content, null, false, new SubProgressMonitor(monitor, 5));
} else {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
IType enclosingType= getEnclosingType();
IType workingCopy= (IType) EditorUtility.getWorkingCopy(enclosingType);
if (workingCopy != null) {
enclosingType= workingCopy;
}
ICompilationUnit parentCU= enclosingType.getCompilationUnit();
imports= new ImportsStructure(parentCU, prefOrder, threshold, true);
lineDelimiter= StubUtility.getLineDelimiterUsed(enclosingType);
String content= createTypeBody(imports, lineDelimiter, parentCU);
IJavaElement[] elems= enclosingType.getChildren();
IJavaElement sibling= elems.length > 0 ? elems[0] : null;
createdType= enclosingType.createType(content, sibling, false, new SubProgressMonitor(monitor, 1));
indent= StubUtility.getIndentUsed(enclosingType) + 1;
}
imports.create(!isInnerClass, new SubProgressMonitor(monitor, 1));
String[] methods= evalMethods(createdType, imports, new SubProgressMonitor(monitor, 1));
if (methods.length > 0) {
for (int i= 0; i < methods.length; i++) {
createdType.createMethod(methods[i], null, false, null);
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
imports.create(!isInnerClass, null);
}
monitor.worked(1);
ICompilationUnit cu= createdType.getCompilationUnit();
ISourceRange range;
if (isInnerClass) {
synchronized(cu) {
cu.reconcile();
}
range= createdType.getSourceRange();
} else {
range= cu.getSourceRange();
}
IBuffer buf= cu.getBuffer();
String originalContent= buf.getText(range.getOffset(), range.getLength());
String formattedContent= StubUtility.codeFormat(originalContent, indent, lineDelimiter);
buf.replace(range.getOffset(), range.getLength(), formattedContent);
if (!isInnerClass) {
String fileComment= getFileComment(cu);
if (fileComment != null) {
buf.replace(0, 0, fileComment + lineDelimiter);
}
buf.save(new SubProgressMonitor(monitor, 1), false);
} else {
monitor.worked(1);
}
fCreatedType= createdType;
monitor.done();
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
}
/**
* Returns the created type. Only valid after createType has been invoked
*/
public IType getCreatedType() {
return fCreatedType;
}
private void writeSuperClass(StringBuffer buf, IImportsStructure imports) {
String typename= getSuperClass();
if (fIsClass && typename.length() > 0 && !"java.lang.Object".equals(typename)) {
buf.append(" extends ");
buf.append(Signature.getSimpleName(typename));
if (fSuperClass != null) {
imports.addImport(JavaModelUtil.getFullyQualifiedName(fSuperClass));
} else {
imports.addImport(typename);
}
}
}
private void writeSuperInterfaces(StringBuffer buf, IImportsStructure imports) {
List interfaces= getSuperInterfaces();
int last= interfaces.size() - 1;
if (last >= 0) {
if (fIsClass) {
buf.append(" implements ");
} else {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
buf.append(" extends ");
}
for (int i= 0; i <= last; i++) {
String typename= (String) interfaces.get(i);
imports.addImport(typename);
buf.append(Signature.getSimpleName(typename));
if (i < last) {
buf.append(", ");
}
}
}
}
/*
* Called from createType to construct the source for this type
*/
private String createTypeBody(IImportsStructure imports, String lineDelimiter, ICompilationUnit parentCU) {
StringBuffer buf= new StringBuffer();
String typeComment= getTypeComment(parentCU);
if (typeComment != null) {
buf.append(typeComment);
buf.append(lineDelimiter);
}
int modifiers= getModifiers();
buf.append(Flags.toString(modifiers));
if (modifiers != 0) {
buf.append(' ');
}
buf.append(fIsClass ? "class " : "interface ");
buf.append(getTypeName());
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
writeSuperClass(buf, imports);
writeSuperInterfaces(buf, imports);
buf.append(" {");
buf.append(lineDelimiter);
buf.append(lineDelimiter);
buf.append('}');
buf.append(lineDelimiter);
return buf.toString();
}
/**
* Called from createType to allow adding methods for the newly created type
* Returns array of sources of the methods that have to be added
* @param parent The type where the methods will be added to
*/
protected String[] evalMethods(IType parent, IImportsStructure imports, IProgressMonitor monitor) throws CoreException {
return new String[0];
}
/**
* Called from createType to get a file comment. By default the content of template
* 'filecomment' is taken.
* Returns source or null, if no file comment should be added
*/
protected String getFileComment(ICompilationUnit parentCU) {
if (CodeGenerationPreferencePage.doFileComments()) {
return getTemplate("filecomment", parentCU);
}
return null;
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
/**
* Called from createType to get a type comment.
* Returns source or null, if no type comment should be added
*/
protected String getTypeComment(ICompilationUnit parentCU) {
if (CodeGenerationPreferencePage.doCreateComments()) {
return getTemplate("typecomment", parentCU);
}
return null;
}
protected String getTemplate(String name, ICompilationUnit parentCU) {
Template[] templates= Templates.getInstance().getTemplates();
for (int i= 0; i < templates.length; i++) {
if (name.equals(templates[i].getName())) {
return evaluateTemplate(templates[i], parentCU);
}
}
return null;
}
private String evaluateTemplate(Template template, ICompilationUnit compilationUnit) {
ContextType contextType= ContextTypeRegistry.getInstance().getContextType("java");
if (contextType == null)
return null;
try {
String string= compilationUnit.getSource();
int position= 0;
JavaContext context= new JavaContext(contextType, string, position, compilationUnit);
context.setForceEvaluation(true);
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
TemplateBuffer buffer= context.evaluate(template);
return buffer.getString();
} catch (CoreException e) {
JavaPlugin.log(e);
return null;
}
}
/**
* Creates the bodies of all unimplemented methods or/and all constructors
* Can be used by implementors of TypePage to add method stub checkboxes
*/
protected String[] constructInheritedMethods(IType type, boolean doConstructors, boolean doUnimplementedMethods, IImportsStructure imports, IProgressMonitor monitor) throws CoreException {
List newMethods= new ArrayList();
ITypeHierarchy hierarchy= type.newSupertypeHierarchy(monitor);
CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();
if (doConstructors) {
IType superclass= hierarchy.getSuperclass(type);
if (superclass != null) {
String[] constructors= StubUtility.evalConstructors(type, superclass, settings, imports);
if (constructors != null) {
for (int i= 0; i < constructors.length; i++) {
newMethods.add(constructors[i]);
}
}
}
}
if (doUnimplementedMethods) {
String[] unimplemented= StubUtility.evalUnimplementedMethods(type, hierarchy, false, settings, null, imports);
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
if (unimplemented != null) {
for (int i= 0; i < unimplemented.length; i++) {
newMethods.add(unimplemented[i]);
}
}
}
return (String[]) newMethods.toArray(new String[newMethods.size()]);
}
/**
* @see NewElementWizardPage#getRunnable
*/
public IRunnableWithProgress getRunnable() {
return new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
if (monitor == null) {
monitor= new NullProgressMonitor();
}
createType(monitor);
} catch (CoreException e) {
throw new InvocationTargetException(e);
}
}
};
}
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.ui;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.core.resources.IProject;
import org.eclipse.jface.operation.IRunnableContext;
import org.eclipse.jface.util.Assert;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.dialogs.SelectionDialog;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.ISourceReference;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
|
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.SharedImages;
import org.eclipse.jdt.internal.ui.dialogs.AbstractElementListSelectionDialog;
import org.eclipse.jdt.internal.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.jdt.internal.ui.dialogs.MainTypeSelectionDialog;
import org.eclipse.jdt.internal.ui.dialogs.MultiMainTypeSelectionDialog;
import org.eclipse.jdt.internal.ui.dialogs.MultiTypeSelectionDialog;
import org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
/**
* Central access point for the Java UI plug-in (id <code>"org.eclipse.jdt.ui"</code>).
* This class provides static methods for:
* <ul>
* <li> creating various kinds of selection dialogs to present a collection
* of Java elements to the user and let them make a selection.</li>
* <li> opening a Java editor on a compilation unit.</li>
* </ul>
* <p>
* This class provides static methods and fields only; it is not intended to be
* instantiated or subclassed by clients.
* </p>
*/
public final class JavaUI {
private static ISharedImages fgSharedImages= null;
private JavaUI() {
}
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
|
/**
* The id of the Java plugin (value <code>"org.eclipse.jdt.ui"</code>).
*/
public static final String ID_PLUGIN= "org.eclipse.jdt.ui";
/**
* The id of the Java perspective
* (value <code>"org.eclipse.jdt.ui.JavaPerspective"</code>).
*/
public static final String ID_PERSPECTIVE= "org.eclipse.jdt.ui.JavaPerspective";
/**
* The id of the Java hierarchy perspective
* (value <code>"org.eclipse.jdt.ui.JavaHierarchyPerspective"</code>).
*/
public static final String ID_HIERARCHYPERSPECTIVE= "org.eclipse.jdt.ui.JavaHierarchyPerspective";
/**
* The id of the Java action set
* (value <code>"org.eclipse.jdt.ui.JavaActionSet"</code>).
*/
public static final String ID_ACTION_SET= "org.eclipse.jdt.ui.JavaActionSet";
/**
* The id of the Java Refactoring action set
* (value <code>"org.eclipse.jdt.ui.refactoring.actionSet"</code>).
*
* @since 2.0
*/
public static final String ID_REFACTORING_ACTION_SET= "org.eclipse.jdt.ui.refactoring.actionSet";
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
|
/**
* The id of the Java Element Creation action set.
*
* @since 2.0
*/
public static final String ID_ELEMENT_CREATION_ACTION_SET= "org.eclipse.jdt.ui.JavaElementCreationActionSet";
/**
* The editor part id of the editor that presents Java compilation units
* (value <code>"org.eclipse.jdt.ui.CompilationUnitEditor"</code>).
*/
public static final String ID_CU_EDITOR= "org.eclipse.jdt.ui.CompilationUnitEditor";
/**
* The editor part id of the editor that presents Java binary class files
* (value <code>"org.eclipse.jdt.ui.ClassFileEditor"</code>).
*/
public static final String ID_CF_EDITOR= "org.eclipse.jdt.ui.ClassFileEditor";
/**
* The editor part id of the code snippet editor
* (value <code>"org.eclipse.jdt.ui.SnippetEditor"</code>).
*/
public static final String ID_SNIPPET_EDITOR= "org.eclipse.jdt.ui.SnippetEditor";
/**
* The view part id of the Packages view
* (value <code>"org.eclipse.jdt.ui.PackageExplorer"</code>).
* <p>
* When this id is used to access
* a view part with <code>IWorkbenchPage.findView</code> or
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
|
* <code>showView</code>, the returned <code>IViewPart</code>
* can be safely cast to an <code>IPackagesViewPart</code>.
* </p>
*
* @see IPackagesViewPart
* @see org.eclipse.ui.IWorkbenchPage#findView
* @see org.eclipse.ui.IWorkbenchPage#showView
*/
public static final String ID_PACKAGES= "org.eclipse.jdt.ui.PackageExplorer";
/**
* The view part id of the type hierarchy part.
* (value <code>"org.eclipse.jdt.ui.TypeHierarchy"</code>).
* <p>
* When this id is used to access
* a view part with <code>IWorkbenchPage.findView</code> or
* <code>showView</code>, the returned <code>IViewPart</code>
* can be safely cast to an <code>ITypeHierarchyViewPart</code>.
* </p>
*
* @see ITypeHierarchyViewPart
* @see org.eclipse.ui.IWorkbenchPage#findView
* @see org.eclipse.ui.IWorkbenchPage#showView
*/
public static final String ID_TYPE_HIERARCHY= "org.eclipse.jdt.ui.TypeHierarchy";
/**
* The class org.eclipse.debug.core.model.IProcess allows attaching
* String properties to processes. The Java UI contributes a property
* page for IProcess that will show the contents of the property
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
|
* with this key.
* The intent of this property is to show the command line a process
* was launched with.
* @deprecated
*/
public final static String ATTR_CMDLINE= JavaPlugin.getPluginId()+".launcher.cmdLine";
/**
* Returns the shared images for the Java UI.
*
* @return the shared images manager
*/
public static ISharedImages getSharedImages() {
if (fgSharedImages == null)
fgSharedImages= new SharedImages();
return fgSharedImages;
}
/**
* Creates a selection dialog that lists all packages of the given Java project.
* The caller is responsible for opening the dialog with <code>Window.open</code>,
* and subsequently extracting the selected packages (of type
* <code>IPackageFragment</code>) via <code>SelectionDialog.getResult</code>.
*
* @param parent the parent shell of the dialog to be created
* @param project the Java project
* @param style flags defining the style of the dialog; the valid flags are:
* <code>IJavaElementSearchConstants.CONSIDER_BINARIES</code>, indicating that
* packages from binary package fragment roots should be included in addition
* to those from source package fragment roots;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
|
* <code>IJavaElementSearchConstants.CONSIDER_REQUIRED_PROJECTS</code>, indicating that
* packages from required projects should be included as well.
* @param filter the filter
* @return a new selection dialog
* @exception JavaModelException if the selection dialog could not be opened
*/
public static SelectionDialog createPackageDialog(Shell parent, IJavaProject project, int style, String filter) throws JavaModelException {
Assert.isTrue((style | IJavaElementSearchConstants.CONSIDER_BINARIES | IJavaElementSearchConstants.CONSIDER_REQUIRED_PROJECTS) ==
(IJavaElementSearchConstants.CONSIDER_BINARIES | IJavaElementSearchConstants.CONSIDER_REQUIRED_PROJECTS));
IPackageFragmentRoot[] roots= null;
if ((style & IJavaElementSearchConstants.CONSIDER_REQUIRED_PROJECTS) != 0) {
roots= project.getAllPackageFragmentRoots();
} else {
roots= project.getPackageFragmentRoots();
}
List consideredRoots= null;
if ((style & IJavaElementSearchConstants.CONSIDER_BINARIES) != 0) {
consideredRoots= Arrays.asList(roots);
} else {
consideredRoots= new ArrayList(roots.length);
for (int i= 0; i < roots.length; i++) {
IPackageFragmentRoot root= roots[i];
if (root.getKind() != IPackageFragmentRoot.K_BINARY)
consideredRoots.add(root);
}
}
int flags= JavaElementLabelProvider.SHOW_DEFAULT;
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
|
if (consideredRoots.size() > 1)
flags= flags | JavaElementLabelProvider.SHOW_ROOT;
List packages= new ArrayList();
Iterator iter= consideredRoots.iterator();
while(iter.hasNext()) {
IPackageFragmentRoot root= (IPackageFragmentRoot)iter.next();
packages.addAll(Arrays.asList(root.getChildren()));
}
ElementListSelectionDialog dialog= new ElementListSelectionDialog(parent, new JavaElementLabelProvider(flags));
dialog.setIgnoreCase(false);
dialog.setElements(packages.toArray());
dialog.setFilter(filter);
return dialog;
}
/**
* @see createPackageDialog(Shell,IJavaProject,int,String)
*/
public static SelectionDialog createPackageDialog(Shell parent, IJavaProject project, int style) throws JavaModelException {
return createPackageDialog(parent, project, style, "A");
}
/**
* Creates a selection dialog that lists all packages under the given package
* fragment root.
* The caller is responsible for opening the dialog with <code>Window.open</code>,
* and subsequently extracting the selected packages (of type
* <code>IPackageFragment</code>) via <code>SelectionDialog.getResult</code>.
*
* @param parent the parent shell of the dialog to be created
* @param root the package fragment root
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
|
* @param filter the filter
* @return a new selection dialog
* @exception JavaModelException if the selection dialog could not be opened
*/
public static SelectionDialog createPackageDialog(Shell parent, IPackageFragmentRoot root, String filter) throws JavaModelException {
ElementListSelectionDialog dialog= new ElementListSelectionDialog(parent, new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT));
dialog.setIgnoreCase(false);
dialog.setElements(root.getChildren());
dialog.setFilter(filter);
return dialog;
}
/**
* @see createPackageDialog(Shell,IPackageFragmentRoot)
*/
public static SelectionDialog createPackageDialog(Shell parent, IPackageFragmentRoot root) throws JavaModelException {
return createPackageDialog(parent, root, "A");
}
/**
* Creates a selection dialog that lists all types in the given scope.
* The caller is responsible for opening the dialog with <code>Window.open</code>,
* and subsequently extracting the selected packages (of type
* <code>IType</code>) via <code>SelectionDialog.getResult</code>.
*
* @param parent the parent shell of the dialog to be created
* @param context the runnable context used to show progress when the dialog
* is being populated
* @param scope the scope that limits which types are included
* @param style flags defining the style of the dialog; the only valid values are
* <code>IJavaElementSearchConstants.CONSIDER_CLASSES</code>,
* <code>CONSIDER_INTERFACES</code>, or their bitwise OR
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
|
* (equivalent to <code>CONSIDER_TYPES</code>)
* @param multipleSelection <code>true</code> if multiple selection is allowed
* @param filter the filter
* @return a new selection dialog
* @exception JavaModelException if the selection dialog could not be opened
*/
public static SelectionDialog createTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection, String filter) throws JavaModelException {
Assert.isTrue((style | IJavaElementSearchConstants.CONSIDER_TYPES) == IJavaElementSearchConstants.CONSIDER_TYPES);
if (multipleSelection) {
MultiTypeSelectionDialog dialog= new MultiTypeSelectionDialog(parent, context, scope, style);
dialog.setFilter(filter);
return dialog;
} else {
TypeSelectionDialog dialog= new TypeSelectionDialog(parent, context, scope, style);
dialog.setFilter(filter);
return dialog;
}
}
/**
* @see createTypeDialog(Shell,IRunnableContext,IJavaSearchScope,int,boolean,String)
*/
public static SelectionDialog createTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection) throws JavaModelException {
return createTypeDialog(parent, context, scope, style, multipleSelection, "A");
}
/**
* Creates a selection dialog that lists all types in the given scope containing
* a standard <code>main</code> method.
* The caller is responsible for opening the dialog with <code>Window.open</code>,
* and subsequently extracting the selected packages (of type
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
|
* <code>IType</code>) via <code>SelectionDialog.getResult</code>.
* <p>
* [Issue: IJavaSearchScope is not currently part of the Java core API.]
* </p>
*
* @param parent the parent shell of the dialog to be created
* @param context the runnable context used to show progress when the dialog
* is being populated
* @param scope the scope that limits which types are included
* @param style flags defining the style of the dialog; the only valid values are
* <code>IJavaElementSearchConstants.CONSIDER_BINARIES</code>,
* <code>CONSIDER_EXTERNAL_JARS</code>, or their bitwise OR, or <code>0</code>
* @param multipleSelection <code>true</code> if multiple selection is allowed
* @param filter the filter
* @return a new selection dialog
*/
public static SelectionDialog createMainTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection, String filter) {
AbstractElementListSelectionDialog dialog= null;
if (multipleSelection) {
dialog= new MultiMainTypeSelectionDialog(parent, context, scope, style);
} else {
dialog= new MainTypeSelectionDialog(parent, context, scope, style);
}
dialog.setFilter(filter);
return dialog;
}
/**
* @see createMainTypeDialog(Shell,IRunnableContext,IJavaSearchScope,int,boolean,String)
*/
public static SelectionDialog createMainTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection) {
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
|
return createMainTypeDialog(parent, context, scope, style, multipleSelection, "A");
}
/**
* Creates a selection dialog that lists all types in the given project.
* The caller is responsible for opening the dialog with <code>Window.open</code>,
* and subsequently extracting the selected packages (of type
* <code>IType</code>) via <code>SelectionDialog.getResult</code>.
*
* @param parent the parent shell of the dialog to be created
* @param context the runnable context used to show progress when the dialog
* is being populated
* @param project the Java project
* @param style flags defining the style of the dialog; the only valid values are
* <code>IJavaElementSearchConstants.CONSIDER_CLASSES</code>,
* <code>CONSIDER_INTERFACES</code>, or their bitwise OR
* (equivalent to <code>CONSIDER_TYPES</code>)
* @param multipleSelection <code>true</code> if multiple selection is allowed
* @return a new selection dialog
* @exception JavaModelException if the selection dialog could not be opened
*/
public static SelectionDialog createTypeDialog(Shell parent, IRunnableContext context, IProject project, int style, boolean multipleSelection) throws JavaModelException {
IJavaSearchScope scope= SearchEngine.createJavaSearchScope(new IJavaProject[] { JavaCore.create(project) });
return createTypeDialog(parent, context, scope, style, multipleSelection);
}
/**
* Opens a Java editor on the given Java compilation unit of class file.
* If there already is an open Java editor for the given element, it is returned.
* <p>
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
|
* [Issue: Explain semantics of opening an editor on a class file.]
* </p>
* <p>
* [Issue: Explain under which conditions it returns null, throws JavaModelException,
* or throws JavaModelException.
* ]
* </p>
*
* @param element the input element; either a compilation unit
* (<code>ICompilationUnit</code>) or a class file (</code>IClassFile</code>)
* @return the editor, or </code>null</code> if wrong element type or opening failed
* @exception PartInitException if the editor could not be initialized
* @exception JavaModelException if this element does not exist or if an
* exception occurs while accessing its underlying resource
*/
public static IEditorPart openInEditor(IJavaElement element) throws JavaModelException, PartInitException {
return EditorUtility.openInEditor(element);
}
/**
* Reveals the source range of the given source reference element in the
* given editor. No checking is done if the editor displays a compilation unit or
* class file that contains the given source reference.
* <p>
* [Issue: Explain what is meant by that last sentence.]
* </p>
* <p>
* [Issue: Explain what happens if the source reference is from some other
* compilation unit, editor is not open, etc.]
* </p>
*
|
5,755 |
Bug 5755 Open Type dialog is missing types
|
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
|
resolved fixed
|
115d4c2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T16:52:36Z | 2001-11-09T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
|
* @param part the editor displaying the compilation unit or class file
* @param element the source reference element defining the source range to be revealed
*
* @deprecated use <code>revealInEditor(IEditorPart, IJavaElement)</code> instead
*/
public static void revealInEditor(IEditorPart part, ISourceReference element) {
if (element instanceof IJavaElement)
revealInEditor(part, (IJavaElement) element);
}
/**
* Reveals the given java element in the given editor. No checking is done if the
* editor displays a compilation unit or class file that contains the given element.
* If the element is not contained, nothing happens.
* @param part the editor displaying a compilation unit or class file
* @param element the element to be revealed
*/
public static void revealInEditor(IEditorPart part, IJavaElement element) {
EditorUtility.revealInEditor(part, element);
}
/**
* Returns the working copy manager for the Java UI plug-in.
*
* @return the working copy manager for the Java UI plug-in
*/
public static IWorkingCopyManager getWorkingCopyManager() {
return JavaPlugin.getDefault().getWorkingCopyManager();
}
}
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/FindImplementorsAction.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.search;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
/**
* Defines an action which searches for implementors of Java interfaces.
*/
public class FindImplementorsAction extends ElementSearchAction {
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/FindImplementorsAction.java
|
public FindImplementorsAction() {
super(SearchMessages.getString("Search.FindImplementorsAction.label"), new Class[] {IType.class});
setToolTipText(SearchMessages.getString("Search.FindImplementorsAction.tooltip"));
setImageDescriptor(JavaPluginImages.DESC_OBJS_SEARCH_DECL);
}
public boolean canOperateOn(ISelection sel) {
if (!super.canOperateOn(sel))
return false;
IJavaElement element= getJavaElement(sel, true);
if (element.getElementType() == IJavaElement.TYPE)
try {
return ((IType) element).isInterface();
} catch (JavaModelException ex) {
ExceptionHandler.log(ex, SearchMessages.getString("Search.Error.javaElementAccess.message"));
return false;
}
return false;
}
protected int getLimitTo() {
return IJavaSearchConstants.IMPLEMENTORS;
}
}
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/GotoMarkerAction.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.search;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.search.ui.ISearchResultView;
import org.eclipse.search.ui.ISearchResultViewEntry;
import org.eclipse.search.ui.SearchUI;
import org.eclipse.search.internal.ui.SearchPlugin;
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/GotoMarkerAction.java
|
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.IPackagesViewPart;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.javaeditor.InternalClassFileEditorInput;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
class GotoMarkerAction extends Action {
private IEditorPart fEditor;
public void run() {
ISearchResultView view= SearchUI.getSearchResultView();
view.getSelection();
ISelection selection= view.getSelection();
Object element= null;
if (selection instanceof IStructuredSelection)
element= ((IStructuredSelection)selection).getFirstElement();
if (element instanceof ISearchResultViewEntry) {
ISearchResultViewEntry entry= (ISearchResultViewEntry)element;
show(entry.getSelectedMarker());
}
}
private void show(IMarker marker) {
IResource resource= marker.getResource();
if (resource == null)
return;
IWorkbenchPage wbPage= JavaPlugin.getActivePage();
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/GotoMarkerAction.java
|
IJavaElement javaElement= getJavaElement(marker);
if (javaElement == null || !javaElement.exists()) {
beep();
return;
}
if (javaElement.getElementType() == IJavaElement.PACKAGE_FRAGMENT) {
try {
IViewPart view= wbPage.showView(JavaUI.ID_PACKAGES);
if (view instanceof IPackagesViewPart)
((IPackagesViewPart)view).selectAndReveal(javaElement);
} catch (PartInitException ex) {
ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.openEditor.title"), SearchMessages.getString("Search.Error.openEditor.message"));
}
} else {
if (SearchUI.reuseEditor())
showWithReuse(marker, resource, javaElement, wbPage);
else
showWithoutReuse(marker, javaElement, wbPage);
}
}
private void showWithoutReuse(IMarker marker, IJavaElement javaElement, IWorkbenchPage wbPage) {
if (javaElement.getElementType() == IJavaElement.PACKAGE_FRAGMENT) {
try {
IViewPart view= wbPage.showView(JavaUI.ID_PACKAGES);
if (view instanceof IPackagesViewPart)
((IPackagesViewPart)view).selectAndReveal(javaElement);
} catch (PartInitException ex) {
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/GotoMarkerAction.java
|
ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.openEditor.title"), SearchMessages.getString("Search.Error.openEditor.message"));
}
return;
}
IEditorPart editor= null;
try {
editor= EditorUtility.openInEditor(javaElement, false);
} catch (PartInitException ex) {
ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.openEditor.title"), SearchMessages.getString("Search.Error.openEditor.message"));
} catch (JavaModelException ex) {
ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.openEditor.title"), SearchMessages.getString("Search.Error.openEditor.message"));
}
if (editor != null)
editor.gotoMarker(marker);
}
private void showWithReuse(IMarker marker, IResource resource, IJavaElement javaElement, IWorkbenchPage wbPage) {
if (javaElement.getElementType() == IJavaElement.PACKAGE_FRAGMENT) {
try {
IViewPart view= wbPage.showView(JavaUI.ID_PACKAGES);
if (view instanceof IPackagesViewPart)
((IPackagesViewPart)view).selectAndReveal(javaElement);
} catch (PartInitException ex) {
ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.openEditor.title"), SearchMessages.getString("Search.Error.openEditor.message"));
}
}
else if (!isBinary(javaElement)) {
if (resource instanceof IFile)
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/GotoMarkerAction.java
|
showInEditor(marker, wbPage, new FileEditorInput((IFile)resource), JavaUI.ID_CU_EDITOR);
}
else {
IClassFile cf= getClassFile(javaElement);
if (cf != null)
showInEditor(marker, wbPage, new InternalClassFileEditorInput(cf), JavaUI.ID_CF_EDITOR);
}
}
private void showInEditor(IMarker marker, IWorkbenchPage page, IEditorInput input, String editorId) {
IEditorPart editor= null;
IEditorPart[] editorParts= page.getEditors();
for (int i= 0; i < editorParts.length; i++) {
IEditorPart part= editorParts[i];
if (input.equals(part.getEditorInput())) {
editor= part;
break;
}
}
if (editor == null) {
if (fEditor != null && !fEditor.isDirty())
page.closeEditor(fEditor, false);
try {
editor= page.openEditor(input, editorId, false);
} catch (PartInitException ex) {
ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.openEditor.title"), SearchMessages.getString("Search.Error.openEditor.message"));
return;
}
} else {
page.bringToTop(editor);
}
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/GotoMarkerAction.java
|
if (editor != null) {
editor.gotoMarker(marker);
fEditor = editor;
}
}
private IClassFile getClassFile(IJavaElement jElement) {
if (jElement instanceof IMember)
return ((IMember)jElement).getClassFile();
return null;
}
private IJavaElement getJavaElement(IMarker marker) {
try {
return JavaCore.create((String)marker.getAttribute(IJavaSearchUIConstants.ATT_JE_HANDLE_ID));
} catch (CoreException ex) {
ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createJavaElement.title"), SearchMessages.getString("Search.Error.createJavaElement.message"));
return null;
}
}
private boolean isBinary(IJavaElement jElement) {
if (jElement instanceof IMember)
return ((IMember)jElement).isBinary();
return false;
}
private void beep() {
Shell shell= JavaPlugin.getActiveWorkbenchShell();
if (shell != null && shell.getDisplay() != null)
shell.getDisplay().beep();
}
}
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaElementAction.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.search;
import java.util.Arrays;
import java.util.List;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.search.ui.ISearchResultViewEntry;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICodeAssist;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IType;
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaElementAction.java
|
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
/**
* Abstract class for actions that run on IJavaElement.
*/
public abstract class JavaElementAction extends Action {
protected static final IJavaElement RETURN_WITHOUT_BEEP= JavaCore.create(JavaPlugin.getDefault().getWorkspace().getRoot());
private Class[] fValidTypes;
public JavaElementAction(String label, Class[] validTypes) {
super(label);
fValidTypes= validTypes;
}
public boolean canOperateOn(ISelection sel) {
boolean hasSelection= !sel.isEmpty();
if (!hasSelection || fValidTypes == null)
return hasSelection;
if (fValidTypes.length == 0)
return false;
IJavaElement element= getJavaElement(sel, true);
if (element != null) {
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaElementAction.java
|
for (int i= 0; i < fValidTypes.length; i++) {
if (fValidTypes[i].isInstance(element))
return true;
}
}
return false;
}
public void run() {
if (!canOperateOn(getSelection())) {
beep();
return;
}
IJavaElement element= getJavaElement(getSelection(), false);
if (element == null) {
beep();
return;
}
else if (element == RETURN_WITHOUT_BEEP)
return;
run(element);
}
protected abstract void run(IJavaElement element);
private IJavaElement getJavaElement(IJavaElement o, boolean silent) {
if (o == null)
return null;
switch (o.getElementType()) {
case IJavaElement.COMPILATION_UNIT:
return findType((ICompilationUnit)o, silent);
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaElementAction.java
|
case IJavaElement.CLASS_FILE:
return findType((IClassFile)o);
}
return o;
}
private IJavaElement getJavaElement(IMarker o, boolean silent) {
try {
return getJavaElement(JavaCore.create((String) ((IMarker) o).getAttribute(IJavaSearchUIConstants.ATT_JE_HANDLE_ID)), silent);
} catch (CoreException ex) {
ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createJavaElement.title"), SearchMessages.getString("Search.Error.createJavaElement.message"));
return null;
}
}
protected IJavaElement getJavaElement(ISelection selection, boolean silent) {
if (selection instanceof ITextSelection)
return getJavaElement((ITextSelection) selection);
else
if (selection instanceof IStructuredSelection)
return getJavaElement((IStructuredSelection) selection, silent);
return null;
}
private IJavaElement getJavaElement(Object o, boolean silent) {
if (o instanceof IJavaElement)
return getJavaElement((IJavaElement)o, silent);
else if (o instanceof IMarker)
return getJavaElement((IMarker)o, silent);
else if (o instanceof ISelection)
return getJavaElement((ISelection)o, silent);
else if (o instanceof ISearchResultViewEntry)
return getJavaElement((ISearchResultViewEntry)o, silent);
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaElementAction.java
|
return null;
}
private IJavaElement getJavaElement(ISearchResultViewEntry entry, boolean silent) {
if (entry != null)
return getJavaElement(entry.getSelectedMarker(), silent);
return null;
}
private IJavaElement getJavaElement(IStructuredSelection selection, boolean silent) {
if (selection.size() == 1)
return getJavaElement(selection.getFirstElement(), silent);
return null;
}
protected IJavaElement getJavaElement(ITextSelection selection) {
IWorkbenchPage wbPage= JavaPlugin.getActivePage();
if (wbPage == null)
return null;
IEditorPart editorPart= wbPage.getActiveEditor();
if (editorPart == null)
return null;
ICodeAssist assist= getCodeAssist(editorPart);
ITextSelection ts= (ITextSelection) selection;
if (assist != null) {
IJavaElement[] elements;
try {
elements= assist.codeSelect(ts.getOffset(), ts.getLength());
} catch (JavaModelException ex) {
ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createJavaElement.title"), SearchMessages.getString("Search.Error.createJavaElement.message"));
return null;
}
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaElementAction.java
|
if (elements != null && elements.length > 0) {
if (elements.length == 1 || !shouldUserBePrompted())
return elements[0];
else if (elements.length > 1)
return chooseFromList(elements);
}
}
return null;
}
public ISelection getSelection() {
IWorkbenchWindow window= JavaPlugin.getActiveWorkbenchWindow();
if (window != null)
return window.getSelectionService().getSelection();
else
return TextSelection.emptySelection();
}
protected ICodeAssist getCodeAssist(IEditorPart editorPart) {
IEditorInput input= editorPart.getEditorInput();
if (input instanceof IClassFileEditorInput)
return ((IClassFileEditorInput)input).getClassFile();
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
return manager.getWorkingCopy(input);
}
private IJavaElement chooseFromList(IJavaElement[] openChoices) {
int flags= JavaElementLabelProvider.SHOW_DEFAULT | JavaElementLabelProvider.SHOW_QUALIFIED;
ILabelProvider labelProvider= new JavaElementLabelProvider(flags);
ElementListSelectionDialog dialog= new ElementListSelectionDialog(JavaPlugin.getActiveWorkbenchShell(), labelProvider);
dialog.setTitle(SearchMessages.getString("SearchElementSelectionDialog.title"));
dialog.setMessage(SearchMessages.getString("SearchElementSelectionDialog.message"));
dialog.setElements(openChoices);
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaElementAction.java
|
if (dialog.open() == dialog.OK)
return (IJavaElement)dialog.getFirstResult();
return null;
}
/**
* Answers if a dialog should prompt the user for a unique Java element
*/
protected boolean shouldUserBePrompted() {
return true;
}
protected void beep() {
Shell shell= JavaPlugin.getActiveWorkbenchShell();
if (shell != null && shell.getDisplay() != null)
shell.getDisplay().beep();
}
protected IJavaElement findType(ICompilationUnit cu, boolean silent) {
IType[] types= null;
try {
types= cu.getAllTypes();
} catch (JavaModelException ex) {
ExceptionHandler.log(ex, SearchMessages.getString("OpenTypeAction.error.open.message"));
if (silent)
return RETURN_WITHOUT_BEEP;
else
return null;
}
if (types.length == 1 || (silent && types.length > 0))
return types[0];
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaElementAction.java
|
if (silent)
return RETURN_WITHOUT_BEEP;
if (types.length == 0)
return null;
String title= SearchMessages.getString("ShowTypeHierarchyAction.selectionDialog.title");
String message = SearchMessages.getString("ShowTypeHierarchyAction.selectionDialog.message");
Shell parent= JavaPlugin.getActiveWorkbenchShell();
int flags= (JavaElementLabelProvider.SHOW_DEFAULT);
ElementListSelectionDialog dialog= new ElementListSelectionDialog(parent, new JavaElementLabelProvider(flags));
dialog.setTitle(title);
dialog.setMessage(message);
dialog.setElements(types);
if (dialog.open() == dialog.OK)
return (IType)dialog.getFirstResult();
else
return RETURN_WITHOUT_BEEP;
}
protected IType findType(IClassFile cf) {
IType mainType;
try {
mainType= cf.getType();
} catch (JavaModelException ex) {
ExceptionHandler.log(ex, SearchMessages.getString("OpenTypeAction.error.open.message"));
return null;
}
return mainType;
}
}
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.search;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
|
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.dialogs.DialogPage;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.model.IWorkbenchAdapter;
import org.eclipse.search.ui.ISearchPage;
import org.eclipse.search.ui.ISearchPageContainer;
import org.eclipse.search.ui.ISearchResultViewEntry;
import org.eclipse.search.ui.IWorkingSet;
import org.eclipse.search.ui.SearchUI;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICodeAssist;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IImportDeclaration;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
|
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.internal.ui.util.RowLayouter;
public class JavaSearchPage extends DialogPage implements ISearchPage, IJavaSearchConstants {
public static final String EXTENSION_POINT_ID= "org.eclipse.jdt.ui.JavaSearchPage";
private final static String PAGE_NAME= "JavaSearchPage";
private final static String STORE_CASE_SENSITIVE= PAGE_NAME + "CASE_SENSITIVE";
private static List fgPreviousSearchPatterns= new ArrayList(20);
private SearchPatternData fInitialData;
private IJavaElement fJavaElement;
private boolean fFirstTime= true;
private IDialogSettings fDialogSettings;
private boolean fIsCaseSensitive;
private Combo fPattern;
private ISearchPageContainer fContainer;
private Button fCaseSensitive;
|
8,581 |
Bug 8581 Switch J Search to StructuredContentProvider
| null |
resolved fixed
|
e50b1da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-07T18:09:36Z | 2002-01-28T12:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
|
private Button[] fSearchFor;
private String[] fSearchForText= {
SearchMessages.getString("SearchPage.searchFor.type"),
SearchMessages.getString("SearchPage.searchFor.method"),
SearchMessages.getString("SearchPage.searchFor.package"),
SearchMessages.getString("SearchPage.searchFor.constructor"),
SearchMessages.getString("SearchPage.searchFor.field")};
private Button[] fLimitTo;
private String[] fLimitToText= {
SearchMessages.getString("SearchPage.limitTo.declarations"),
SearchMessages.getString("SearchPage.limitTo.implementors"),
SearchMessages.getString("SearchPage.limitTo.references"),
SearchMessages.getString("SearchPage.limitTo.allOccurrences"),
SearchMessages.getString("SearchPage.limitTo.readReferences"),
SearchMessages.getString("SearchPage.limitTo.writeReferences")};
private class SearchPatternData {
int searchFor;
int limitTo;
String pattern;
boolean isCaseSensitive;
IJavaElement javaElement;
int scope;
IWorkingSet workingSet;
public SearchPatternData(int s, int l, String p, IJavaElement element) {
this(s, l, p, fIsCaseSensitive || element != null, element, ISearchPageContainer.WORKSPACE_SCOPE, null);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.