当前位置: 首页>>代码示例>>Java>>正文


Java IShowInTargetList类代码示例

本文整理汇总了Java中org.eclipse.ui.part.IShowInTargetList的典型用法代码示例。如果您正苦于以下问题:Java IShowInTargetList类的具体用法?Java IShowInTargetList怎么用?Java IShowInTargetList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IShowInTargetList类属于org.eclipse.ui.part包,在下文中一共展示了IShowInTargetList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
@Override
public Object getAdapter(Class key) {
	if (key.equals(ISelectionProvider.class))
		return fViewer;
	if (key == IShowInSource.class) {
		return getShowInSource();
	}
	if (key == IShowInTargetList.class) {
		return new IShowInTargetList() {
			public String[] getShowInTargetIds() {
				return new String[] { JavaPlugin.ID_RES_NAV };
			}

		};
	}
	if (key == IContextProvider.class) {
		return JavaUIHelp.getHelpContextProvider(this, IJavaHelpContextIds.PACKAGES_VIEW);
	}
	return super.getAdapter(key);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:21,代码来源:PackageExplorerPart.java

示例2: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
   @Override
public Object getAdapter(Class adapter) {
   	if (adapter == IShowInSource.class) {
   		return getShowInSource();
   	}
   	if (adapter == IContextProvider.class) {
   		return JavaUIHelp.getHelpContextProvider(this, IJavaHelpContextIds.CALL_HIERARCHY_VIEW);
   	}
	if (adapter == IShowInTargetList.class) {
		return new IShowInTargetList() {
			public String[] getShowInTargetIds() {
				return new String[] { JavaUI.ID_PACKAGES, JavaPlugin.ID_RES_NAV };
			}
		};
	}
   	return super.getAdapter(adapter);
   }
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:21,代码来源:CallHierarchyViewPart.java

示例3: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
public Object getAdapter(Class key) {
	if (key == IShowInSource.class) {
		return getShowInSource();
	}
	if (key == IShowInTargetList.class) {
		return new IShowInTargetList() {
			public String[] getShowInTargetIds() {
				return new String[] { JavaUI.ID_PACKAGES };
			}

		};
	}
	if (key == IShowInTarget.class) {
		return getShowInTarget();
	}

	return null;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:19,代码来源:JavaOutlinePage.java

示例4: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
@Override
public Object getAdapter(Class key) {
	if (key == IShowInSource.class) {
		return getShowInSource();
	}
	if (key == IShowInTargetList.class) {
		return new IShowInTargetList() {
			public String[] getShowInTargetIds() {
				return new String[] { JavaUI.ID_PACKAGES, JavaPlugin.ID_RES_NAV  };
			}

		};
	}
	if (key == IContextProvider.class) {
		return JavaUIHelp.getHelpContextProvider(this, IJavaHelpContextIds.TYPE_HIERARCHY_VIEW);
	}
	return super.getAdapter(key);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:19,代码来源:TypeHierarchyViewPart.java

示例5: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public <T> T getAdapter(Class<T> requestedClass) {
	if (IContentOutlinePage.class.equals(requestedClass)) {
		IContentOutlinePage outlinePage = this.outlinePage; 
		return (T) outlinePage;
	}
	if(requestedClass == IShowInTargetList.class) {
		return (T) new IShowInTargetList() {
			@Override
			public String[] getShowInTargetIds() {
				return array(IPageLayout.ID_OUTLINE);
			}
		};
	}
	return super.getAdapter(requestedClass);
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:18,代码来源:AbstractLangStructureEditor.java

示例6: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
public Object getAdapter(Class adapter) {
	if (IShowInTargetList.class.equals(adapter)) {
		return SHOW_IN_TARGET_LIST;
	}

	if (adapter == IShowInSource.class) {
		ISelectionProvider selectionProvider= getSite().getSelectionProvider();
		if (selectionProvider == null)
			return null;

		ISelection selection= selectionProvider.getSelection();
		if (selection instanceof IStructuredSelection) {
			IStructuredSelection structuredSelection= ((StructuredSelection)selection);
			final Set newSelection= new HashSet(structuredSelection.size());
			Iterator iter= structuredSelection.iterator();
			while (iter.hasNext()) {
				Object element= iter.next();
				if (element instanceof LineElement)
					element= ((LineElement)element).getParent();
				newSelection.add(element);
			}

			return new IShowInSource() {
				public ShowInContext getShowInContext() {
					return new ShowInContext(null, new StructuredSelection(new ArrayList(newSelection)));
				}
			};
		}
		return null;
	}

	return null;
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:34,代码来源:TypeScriptSearchResultPage.java

示例7: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
/**
 * @generated
 */
@SuppressWarnings("rawtypes")
public Object getAdapter(Class type) {
	if (type == IShowInTargetList.class) {
		return new IShowInTargetList() {
			public String[] getShowInTargetIds() {
				return new String[] { ProjectExplorer.VIEW_ID };
			}
		};
	}
	return super.getAdapter(type);
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:15,代码来源:StatemachineDiagramEditor.java

示例8: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
@Override
public Object getAdapter(Class adapter) {
	if (adapter == IShowInTargetList.class) {
		return new IShowInTargetList() {
			public String[] getShowInTargetIds() {
				return new String[] { JavaUI.ID_PACKAGES, JavaPlugin.ID_RES_NAV };
			}

		};
	}
	return super.getAdapter(adapter);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:PropertiesFileEditor.java

示例9: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
@Override
public Object getAdapter(Class key) {
	if (key == IShowInTargetList.class) {
		return new IShowInTargetList() {
			public String[] getShowInTargetIds() {
				return new String[] { JavaUI.ID_PACKAGES, JavaPlugin.ID_RES_NAV  };
			}

		};
	}
	return super.getAdapter(key);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:ProjectsView.java

示例10: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
@Override
public Object getAdapter(Class key) {
	if (key == IShowInTargetList.class) {
		return new IShowInTargetList() {
			public String[] getShowInTargetIds() {
				return new String[] { JavaUI.ID_PACKAGES };
			}

		};
	}
	return super.getAdapter(key);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:MembersView.java

示例11: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
@Override
public Object getAdapter(Class key) {
	if (key == IShowInTargetList.class) {
		return new IShowInTargetList() {
			public String[] getShowInTargetIds() {
				return new String[] { JavaUI.ID_PACKAGES, JavaPlugin.ID_RES_NAV };
			}

		};
	}
	return super.getAdapter(key);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:TypesView.java

示例12: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
@Override
public Object getAdapter(Class key) {
	if (key == IShowInTargetList.class) {
		return new IShowInTargetList() {
			public String[] getShowInTargetIds() {
				return new String[] { JavaUI.ID_PACKAGES, JavaPlugin.ID_RES_NAV  };
			}
		};
	}
	return super.getAdapter(key);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:12,代码来源:PackagesView.java

示例13: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
/**
 * @generated
 */
public Object getAdapter(Class type) {
	if (type == IShowInTargetList.class) {
		return new IShowInTargetList() {
			public String[] getShowInTargetIds() {
				return new String[] { ProjectExplorer.VIEW_ID };
			}
		};
	}
	return super.getAdapter(type);
}
 
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:14,代码来源:SmcDiagramEditor.java

示例14: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
public Object getAdapter(Class<?> adapter) {
    if (IShowInTargetList.class.equals(adapter)) {
        return SHOW_IN_TARGET_LIST;
    }

    if (adapter == IShowInSource.class) {
        ISelectionProvider selectionProvider = getSite().getSelectionProvider();
        if (selectionProvider == null) {
            return null;
        }

        ISelection selection = selectionProvider.getSelection();
        if (selection instanceof IStructuredSelection) {
            IStructuredSelection structuredSelection = ((StructuredSelection) selection);
            final Set<Object> newSelection = new HashSet<>(structuredSelection.size());
            Iterator<?> iter = structuredSelection.iterator();
            while (iter.hasNext()) {
                Object element = iter.next();
                if (element instanceof ICustomLineElement) {
                    element = ((ICustomLineElement) element).getParent();
                }
                newSelection.add(element);
            }

            return new IShowInSource() {
                @Override
                public ShowInContext getShowInContext() {
                    return new ShowInContext(null, new StructuredSelection(new ArrayList<>(newSelection)));
                }
            };
        }
        return null;
    }

    return null;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:37,代码来源:AbstractSearchIndexResultPage.java

示例15: getAdapter

import org.eclipse.ui.part.IShowInTargetList; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public <T> T getAdapter(Class<T> adapter) {
    if (IShowInTargetList.class.equals(adapter)) {
        return (T) SHOW_IN_TARGET_LIST;
    }
    return null;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:9,代码来源:FileSearchPage.java


注:本文中的org.eclipse.ui.part.IShowInTargetList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。