當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。