本文整理汇总了Java中org.eclipse.jface.text.source.IVerticalRulerInfo类的典型用法代码示例。如果您正苦于以下问题:Java IVerticalRulerInfo类的具体用法?Java IVerticalRulerInfo怎么用?Java IVerticalRulerInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IVerticalRulerInfo类属于org.eclipse.jface.text.source包,在下文中一共展示了IVerticalRulerInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createAction
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {
try {
ResourceBundle rb = SootPlugin.getDefault().getResourceBundle();
if (editor instanceof JimpleEditor){
return new SootAttributeJimpleSelectAction(rb, null, editor, rulerInfo);
}
else {
return new SootAttributeJavaSelectAction(rb, null, editor, rulerInfo);
}
}
catch (Exception e){
System.out.println("exception: "+e.getMessage());
}
return null;
}
开发者ID:flankerhqd,项目名称:JAADAS,代码行数:17,代码来源:SootAttributeRulerActionDelegate.java
示例2: getMarkersForCurrentLine
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
/**
* Gets the {@link List} of {@link IMarker} for the current line.
*
* @return the {@link List} of {@link IMarker}
*/
private List<IMarker> getMarkersForCurrentLine() {
final List<IMarker> res = new ArrayList<IMarker>();
final IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.getActiveEditor();
if (activeEditor instanceof ITextEditor) {
final IVerticalRulerInfo rulerInfo = (IVerticalRulerInfo)activeEditor.getAdapter(
IVerticalRulerInfo.class);
// TODO check if the last right click has been done on the ruler
final IResource resource = getResource(activeEditor);
if (resource != null) {
res.addAll(getMarkers((ITextEditor)activeEditor, rulerInfo));
}
}
return res;
}
开发者ID:ModelWriter,项目名称:Source,代码行数:24,代码来源:QuickFixContributionItem.java
示例3: getMarkers
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
/**
* Gets the {@link List} of {@link IMarker} for the current line of the given {@link ITextEditor}.
*
* @param editor
* the {@link ITextEditor}
* @param rulerInfo
* the {@link IVerticalRulerInfo}
* @return the {@link List} of {@link IMarker} for the current line of the given {@link ITextEditor}
*/
protected List<IMarker> getMarkers(final ITextEditor editor, final IVerticalRulerInfo rulerInfo) {
final List<IMarker> res = new ArrayList<IMarker>();
final IDocument document = (IDocument)editor.getDocumentProvider().getDocument(editor
.getEditorInput());
if (document != null) {
final AbstractMarkerAnnotationModel model = getAnnotationModel(editor);
if (model != null) {
final int activeLine = rulerInfo.getLineOfLastMouseButtonActivity();
res.addAll(getMarkers(document, model, activeLine));
}
}
return res;
}
开发者ID:ModelWriter,项目名称:Source,代码行数:25,代码来源:QuickFixContributionItem.java
示例4: createContributionItems
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
@Override
public void createContributionItems(IServiceLocator serviceLocator, IContributionRoot additions) {
ITextEditor editor = (ITextEditor)
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
IVerticalRulerInfo rulerInfo = editor.getAdapter(IVerticalRulerInfo.class);
try {
List<IMarker> markers = getMarkers(editor, rulerInfo);
additions.addContributionItem(new ReviewMarkerMenuContribution(editor, markers), null);
if (!markers.isEmpty()) {
additions.addContributionItem(new Separator(), null);
}
} catch (CoreException e) {
AppraiseUiPlugin.logError("Error creating marker context menus", e);
}
}
开发者ID:google,项目名称:git-appraise-eclipse,代码行数:17,代码来源:ReviewMarkerContributionFactory.java
示例5: createAddBreakPointAction
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
/**
* @return an action that can be run to create a breakpoint in the given line
*/
public PyBreakpointRulerAction createAddBreakPointAction(final int line) {
PyBreakpointRulerAction ret = new PyBreakpointRulerAction(debugEditor, new IVerticalRulerInfo() {
@Override
public int getLineOfLastMouseButtonActivity() {
return line;
}
@Override
public Control getControl() {
throw new RuntimeException("Not Implemented");
}
@Override
public int getWidth() {
throw new RuntimeException("Not Implemented");
}
@Override
public int toDocumentLineNumber(int y_coordinate) {
throw new RuntimeException("Not Implemented");
}
});
ret.update();
return ret;
}
开发者ID:fabioz,项目名称:Pydev,代码行数:29,代码来源:DebuggerTestUtils.java
示例6: execute
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IEditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
IFileEditorInput input = (IFileEditorInput) part.getEditorInput();
IFile file = input.getFile();
if (part instanceof ITextEditor) {
final ITextEditor editor = (ITextEditor) part;
IVerticalRulerInfo ruleInfo = editor.getAdapter(IVerticalRulerInfo.class);
IDocumentProvider provider = editor.getDocumentProvider();
IDocument document = provider.getDocument(editor.getEditorInput());
int lineNumber = ruleInfo.getLineOfLastMouseButtonActivity();
String className = file.getName().substring(0, file.getName().lastIndexOf('.'));
HashMap<VFUnit, VFMethod> resultantUnit = getSelectedUnit(className, document, lineNumber);
List<VFNode> unit = new ArrayList<>();
if (resultantUnit.size() > 0) {
if (event.getCommand().getId().equals("JavaHandler.NavigateToJimple")) {
NavigationHandler handler = new NavigationHandler();
handler.highlightJimpleSource(new ArrayList<>(resultantUnit.keySet()));
} else {
for (VFUnit vfUnit : resultantUnit.keySet()) {
unit.add(new VFNode(vfUnit, 0));
}
try {
ServiceUtil.getService(DataModel.class).filterGraph(unit, true, true, null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
// call graph highlighting code here
} else {
logger.error("Editor not a Text Editor");
}
return null;
}
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:39,代码来源:JavaToCFGHandler.java
示例7: getMarkers
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
private List<IMarker> getMarkers(ITextEditor editor, IVerticalRulerInfo rulerInfo)
throws CoreException {
List<IMarker> clickedOnMarkers = new ArrayList<IMarker>();
for (IMarker marker : getAllMarkers(editor)) {
if (markerHasBeenClicked(marker, rulerInfo)) {
clickedOnMarkers.add(marker);
}
}
return clickedOnMarkers;
}
开发者ID:google,项目名称:git-appraise-eclipse,代码行数:12,代码来源:ReviewMarkerContributionFactory.java
示例8: JavaSelectAnnotationRulerAction
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
public JavaSelectAnnotationRulerAction(ResourceBundle bundle, String prefix, ITextEditor editor, IVerticalRulerInfo ruler) {
super(bundle, prefix, editor, ruler);
fBundle= bundle;
fTextEditor= editor;
fAnnotationPreferenceLookup= EditorsUI.getAnnotationPreferenceLookup();
fStore= JavaPlugin.getDefault().getCombinedPreferenceStore();
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.JAVA_SELECT_MARKER_RULER_ACTION);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:11,代码来源:JavaSelectAnnotationRulerAction.java
示例9: PyBreakpointRulerAction
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
public PyBreakpointRulerAction(ITextEditor editor, IVerticalRulerInfo ruler) {
setInfo(ruler);
setTextEditor(editor);
setText("Breakpoint &Properties...");
fAddLabel = "Add Breakpoint";
fRemoveLabel = "Remove Breakpoint";
}
开发者ID:fabioz,项目名称:Pydev,代码行数:8,代码来源:PyBreakpointRulerAction.java
示例10: getLineNumber
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
private int getLineNumber() throws BadLocationException {
IVerticalRulerInfo ruleInfo = getTextEditor().getAdapter(IVerticalRulerInfo.class);
int lineNumber = ruleInfo.getLineOfLastMouseButtonActivity();
int actualLineNumber = lineNumber + 1;
return actualLineNumber;
}
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:7,代码来源:ToggleJimpleBreakpointsTarget.java
示例11: createAction
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
@Override
protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {
return new UnitBreakpointPropertiesAction(editor, rulerInfo);
}
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:5,代码来源:UnitBreakpointPropertiesActionDelegate.java
示例12: UnitBreakpointPropertiesAction
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
/**
* Creates the action to enable/disable breakpoints
*/
public UnitBreakpointPropertiesAction(ITextEditor editor, IVerticalRulerInfo info) {
super(editor, info);
setText("Unit Breakpoint Properties");
}
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:8,代码来源:UnitBreakpointPropertiesAction.java
示例13: SootAttributeJavaSelectAction
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
public SootAttributeJavaSelectAction(ResourceBundle bundle, String prefix, ITextEditor editor, IVerticalRulerInfo rulerInfo) {
super(bundle, prefix, editor, rulerInfo);
}
开发者ID:flankerhqd,项目名称:JAADAS,代码行数:4,代码来源:SootAttributeJavaSelectAction.java
示例14: SootAttributeJimpleSelectAction
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
public SootAttributeJimpleSelectAction(ResourceBundle bundle, String prefix, ITextEditor editor, IVerticalRulerInfo rulerInfo) {
super(bundle, prefix, editor, rulerInfo);
}
开发者ID:flankerhqd,项目名称:JAADAS,代码行数:4,代码来源:SootAttributeJimpleSelectAction.java
示例15: XtextMarkerRulerAction
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
public XtextMarkerRulerAction(ResourceBundle bundle, String prefix, XtextEditor editor, IVerticalRulerInfo ruler) {
super(bundle, prefix, editor, ruler);
this.textEditor = editor;// can't access private super field
this.ruler = ruler;
}
开发者ID:cplutte,项目名称:bts,代码行数:6,代码来源:XtextMarkerRulerAction.java
示例16: markerHasBeenClicked
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
private boolean markerHasBeenClicked(IMarker marker, IVerticalRulerInfo rulerInfo) {
return (marker.getAttribute(IMarker.LINE_NUMBER, 0))
== (rulerInfo.getLineOfLastMouseButtonActivity() + 1);
}
开发者ID:google,项目名称:git-appraise-eclipse,代码行数:5,代码来源:ReviewMarkerContributionFactory.java
示例17: JsBreakpointPropertiesRulerAction
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
public JsBreakpointPropertiesRulerAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {
super(editor, rulerInfo);
setText(Messages.JsBreakpointPropertiesRulerAction_ItemLabel);
}
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:5,代码来源:JsBreakpointPropertiesRulerAction.java
示例18: createAction
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
@Override
protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {
return new JsBreakpointPropertiesRulerAction(editor, rulerInfo);
}
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:5,代码来源:JsBreakpointPropertiesRulerAction.java
示例19: createAction
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
@Override
protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {
return new JavaSelectAnnotationRulerAction(JavaEditorMessages.getBundleForConstructedKeys(), "JavaSelectAnnotationRulerAction.", editor, rulerInfo); //$NON-NLS-1$
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:JavaSelectRulerAction.java
示例20: getInfo
import org.eclipse.jface.text.source.IVerticalRulerInfo; //导入依赖的package包/类
protected IVerticalRulerInfo getInfo() {
return fInfo;
}
开发者ID:fabioz,项目名称:Pydev,代码行数:4,代码来源:AbstractBreakpointRulerAction.java
注:本文中的org.eclipse.jface.text.source.IVerticalRulerInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论