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


Java IDocumentListener类代码示例

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


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

示例1: addCommand

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
/**
 * Adds an additional replace command. The added replace command must not overlap with existing
 * ones. If the document command owner is not <code>null</code>, it will not get document change
 * notifications for the particular command.
 *
 * @param commandOffset the offset of the region to replace
 * @param commandLength the length of the region to replace
 * @param commandText the text to replace with, may be <code>null</code>
 * @param commandOwner the command owner, may be <code>null</code>
 * @throws BadLocationException if the added command intersects with an existing one
 * @since 2.1
 */
public void addCommand(
    int commandOffset, int commandLength, String commandText, IDocumentListener commandOwner)
    throws BadLocationException {
  final Command command = new Command(commandOffset, commandLength, commandText, commandOwner);

  if (intersects(command)) throw new BadLocationException();

  final int index = Collections.binarySearch(fCommands, command);

  // a command with exactly the same ranges exists already
  if (index >= 0) throw new BadLocationException();

  // binary search result is defined as (-(insertionIndex) - 1)
  final int insertionIndex = -(index + 1);

  // overlaps to the right?
  if (insertionIndex != fCommands.size()
      && intersects((Command) fCommands.get(insertionIndex), command))
    throw new BadLocationException();

  // overlaps to the left?
  if (insertionIndex != 0 && intersects((Command) fCommands.get(insertionIndex - 1), command))
    throw new BadLocationException();

  fCommands.add(insertionIndex, command);
}
 
开发者ID:eclipse,项目名称:che,代码行数:39,代码来源:DocumentCommand.java

示例2: addDocumentListener

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
@Override
public void addDocumentListener(IDocumentListener listener) {
	throw new UnsupportedOperationException();
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:5,代码来源:DummyDocument.java

示例3: removeDocumentListener

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
@Override
public void removeDocumentListener(IDocumentListener listener) {
	throw new UnsupportedOperationException();
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:5,代码来源:DummyDocument.java

示例4: addPrenotifiedDocumentListener

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
@Override
public void addPrenotifiedDocumentListener(IDocumentListener documentAdapter) {
	throw new UnsupportedOperationException();
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:5,代码来源:DummyDocument.java

示例5: removePrenotifiedDocumentListener

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
@Override
public void removePrenotifiedDocumentListener(IDocumentListener documentAdapter) {
	throw new UnsupportedOperationException();
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:5,代码来源:DummyDocument.java

示例6: addDocumentListener

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
public void addDocumentListener(IDocumentListener listener) {
  throw new UnsupportedMockOperationException();
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:4,代码来源:MockDocument.java

示例7: addPrenotifiedDocumentListener

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
public void addPrenotifiedDocumentListener(IDocumentListener documentAdapter) {
  throw new UnsupportedMockOperationException();
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:4,代码来源:MockDocument.java

示例8: removeDocumentListener

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
public void removeDocumentListener(IDocumentListener listener) {
  throw new UnsupportedMockOperationException();
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:4,代码来源:MockDocument.java

示例9: removePrenotifiedDocumentListener

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
public void removePrenotifiedDocumentListener(
    IDocumentListener documentAdapter) {
  throw new UnsupportedMockOperationException();
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:5,代码来源:MockDocument.java

示例10: addDocumentListener

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
public void addDocumentListener(IDocumentListener listener) {
	// defining interface method
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:SimpleDocument.java

示例11: removeDocumentListener

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
public void removeDocumentListener(IDocumentListener listener) {
	// defining interface method
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:SimpleDocument.java

示例12: addPrenotifiedDocumentListener

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
public void addPrenotifiedDocumentListener(IDocumentListener documentAdapter) {
	// defining interface method
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:SimpleDocument.java

示例13: removePrenotifiedDocumentListener

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
public void removePrenotifiedDocumentListener(IDocumentListener documentAdapter) {
	// defining interface method
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:SimpleDocument.java

示例14: addDocumentListener

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
@Override
public void addDocumentListener(IDocumentListener listener) {
    throw new RuntimeException("not implemented");
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:5,代码来源:DocCopy.java

示例15: removeDocumentListener

import org.eclipse.jface.text.IDocumentListener; //导入依赖的package包/类
@Override
public void removeDocumentListener(IDocumentListener listener) {
    throw new RuntimeException("not implemented");
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:5,代码来源:DocCopy.java


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