org.eclipse.ui.console.IOConsole#org.eclipse.jface.text.IDocumentListener源码实例Demo

下面列出了org.eclipse.ui.console.IOConsole#org.eclipse.jface.text.IDocumentListener 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: sarl   文件: DocumentAutoFormatter.java
@Override
public void endAutoFormat() {
	final Collection<RegionFormattingRequest> requests;
	synchronized (this) {
		requests = this.formattingRequests;
		this.formattingRequests = Collections.synchronizedList(new ArrayList<>(1));
		if (this.autoFormatListener != null) {
			final IDocumentListener listener = this.autoFormatListener;
			this.autoFormatListener = null;
			if (this.document != null) {
				this.document.removeDocumentListener(listener);
			}
		}
	}
	if (this.contentFormatter != null) {
		for (final RegionFormattingRequest request : requests) {
			formatRegion(request.document, request.offset, request.length);
		}
	}
}
 
源代码2 项目: Pydev   文件: BaseDocumentCommand.java
/**
 * Creates a new command with the given specification.
 *
 * @param offset the offset of the replace command
 * @param length the length of the replace command
 * @param text the text to replace with, may be <code>null</code>
 * @param owner the document command owner, may be <code>null</code>
 * @since 3.0
 */
public Command(int offset, int length, String text, IDocumentListener owner) {
    if (offset < 0 || length < 0) {
        throw new IllegalArgumentException();
    }
    fOffset = offset;
    fLength = length;
    fText = text;
    fOwner = owner;
}
 
源代码3 项目: Pydev   文件: BaseDocumentCommand.java
/**
 * 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(fCommands.get(insertionIndex), command)) {
        throw new BadLocationException();
    }

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

    fCommands.add(insertionIndex, command);
}
 
@Override
public void addDocumentListener(IDocumentListener listener) {
	fail("Unexpected call");
}
 
@Override
public void addPrenotifiedDocumentListener(IDocumentListener documentAdapter) {
	fail("Unexpected call");
}
 
@Override
public void removeDocumentListener(IDocumentListener listener) {
	fail("Unexpected call");
}
 
@Override
public void removePrenotifiedDocumentListener(IDocumentListener documentAdapter) {
	fail("Unexpected call");
}
 
源代码8 项目: xtext-eclipse   文件: DummyDocument.java
@Override
public void addDocumentListener(IDocumentListener listener) {
	throw new UnsupportedOperationException();
}
 
源代码9 项目: xtext-eclipse   文件: DummyDocument.java
@Override
public void removeDocumentListener(IDocumentListener listener) {
	throw new UnsupportedOperationException();
}
 
源代码10 项目: xtext-eclipse   文件: DummyDocument.java
@Override
public void addPrenotifiedDocumentListener(IDocumentListener documentAdapter) {
	throw new UnsupportedOperationException();
}
 
源代码11 项目: xtext-eclipse   文件: DummyDocument.java
@Override
public void removePrenotifiedDocumentListener(IDocumentListener documentAdapter) {
	throw new UnsupportedOperationException();
}
 
源代码12 项目: statecharts   文件: DummyDocument.java
@Override
public void addDocumentListener(IDocumentListener listener) {
	throw new UnsupportedOperationException();
}
 
源代码13 项目: statecharts   文件: DummyDocument.java
@Override
public void removeDocumentListener(IDocumentListener listener) {
	throw new UnsupportedOperationException();
}
 
源代码14 项目: statecharts   文件: DummyDocument.java
@Override
public void addPrenotifiedDocumentListener(IDocumentListener documentAdapter) {
	throw new UnsupportedOperationException();
}
 
源代码15 项目: statecharts   文件: DummyDocument.java
@Override
public void removePrenotifiedDocumentListener(IDocumentListener documentAdapter) {
	throw new UnsupportedOperationException();
}
 
源代码16 项目: gwt-eclipse-plugin   文件: MockDocument.java
public void addDocumentListener(IDocumentListener listener) {
  throw new UnsupportedMockOperationException();
}
 
源代码17 项目: gwt-eclipse-plugin   文件: MockDocument.java
public void addPrenotifiedDocumentListener(IDocumentListener documentAdapter) {
  throw new UnsupportedMockOperationException();
}
 
源代码18 项目: gwt-eclipse-plugin   文件: MockDocument.java
public void removeDocumentListener(IDocumentListener listener) {
  throw new UnsupportedMockOperationException();
}
 
源代码19 项目: gwt-eclipse-plugin   文件: MockDocument.java
public void removePrenotifiedDocumentListener(
    IDocumentListener documentAdapter) {
  throw new UnsupportedMockOperationException();
}
 
public void addDocumentListener(IDocumentListener listener) {
	// defining interface method
}
 
public void removeDocumentListener(IDocumentListener listener) {
	// defining interface method
}
 
public void addPrenotifiedDocumentListener(IDocumentListener documentAdapter) {
	// defining interface method
}
 
public void removePrenotifiedDocumentListener(IDocumentListener documentAdapter) {
	// defining interface method
}
 
源代码24 项目: Pydev   文件: DocCopy.java
@Override
public void addDocumentListener(IDocumentListener listener) {
    throw new RuntimeException("not implemented");
}
 
源代码25 项目: Pydev   文件: DocCopy.java
@Override
public void removeDocumentListener(IDocumentListener listener) {
    throw new RuntimeException("not implemented");
}
 
源代码26 项目: Pydev   文件: DocCopy.java
@Override
public void addPrenotifiedDocumentListener(IDocumentListener documentAdapter) {
    throw new RuntimeException("not implemented");
}
 
源代码27 项目: Pydev   文件: DocCopy.java
@Override
public void removePrenotifiedDocumentListener(IDocumentListener documentAdapter) {
    throw new RuntimeException("not implemented");
}
 
源代码28 项目: Pydev   文件: PyEdit.java
/**
 * Important: keep for scripting
 */
public Class<IDocumentListener> getIDocumentListenerClass() {
    return IDocumentListener.class;
}