Merge branch 'master' of git.labs.intellij.net:idea/community

This commit is contained in:
kirillk
2011-09-06 23:36:08 +04:00
35 changed files with 160 additions and 122 deletions
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.NotNull;
*/
public class SmartCompletionContextType extends TemplateContextType {
public SmartCompletionContextType() {
super("COMPLETION", CodeInsightBundle.message("dialog.edit.template.checkbox.smart.type.completion"));
super("COMPLETION", CodeInsightBundle.message("dialog.edit.template.checkbox.smart.type.completion"), JavaCodeContextType.class);
}
@Override
@@ -579,12 +579,7 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase impleme
callback.pass(null);
}
else {
new OccurrencesChooser<PsiExpression>(editor) {
@Override
protected TextRange getOccurrenceRange(PsiExpression occurrence) {
return occurrence.getTextRange();
}
}.showChooser(callback, occurrencesMap);
new OccurrencesChooser<PsiExpression>(editor).showChooser(callback, occurrencesMap);
}
return wasSucceed[0];
}
@@ -29,6 +29,7 @@ import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleUtil;
import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectUtil;
import com.intellij.openapi.roots.ProjectFileIndex;
import com.intellij.openapi.roots.ProjectRootManager;
import com.intellij.openapi.ui.Messages;
@@ -275,12 +276,20 @@ public class MoveClassesOrPackagesDialog extends RefactoringDialog {
}
};
final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(myProject).getFileIndex();
comboBox.setRenderer(new ListCellRendererWrapper<DirectoryChooser.ItemWrapper>(comboBox) {
comboBox.setRenderer(new HtmlListCellRenderer<DirectoryChooser.ItemWrapper>(comboBox.getRenderer()){
@Override
public void customize(JList list, DirectoryChooser.ItemWrapper itemWrapper, int index, boolean selected, boolean hasFocus) {
protected void doCustomize(JList list,
DirectoryChooser.ItemWrapper itemWrapper,
int index,
boolean selected,
boolean hasFocus) {
if (itemWrapper != null) {
setIcon(itemWrapper.getIcon(fileIndex));
setText(itemWrapper.getPresentableUrl());
final PsiDirectory directory = itemWrapper.getDirectory();
final VirtualFile virtualFile = directory != null ? directory.getVirtualFile() : null;
append(virtualFile != null ? ProjectUtil.calcRelativeToProjectPath(virtualFile, myProject) : itemWrapper.getPresentableUrl());
} else {
setText("Leave in same source root");
}
@@ -0,0 +1,14 @@
class Super {
public static final Super FOO = null;
}
class Super2 {
}
class Intermediate {
void foo(Super s, int a) {}
void bar() {
foo(Su<caret>)
}
}
@@ -0,0 +1,14 @@
class Super {
public static final Super FOO = null;
}
class Super2 {
}
class Intermediate {
void foo(Super s, int a) {}
void bar() {
foo(Super.<caret>)
}
}
@@ -860,8 +860,8 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
public void testQualifyInnerMembers() throws Throwable { doTest('\n') }
public void testSuggestExpectedTypeMembers() throws Throwable { doTest('\n') }
public void testSuggestExpectedTypeMembersInCall() throws Throwable { doTest('\n') }
public void testExpectedTypesDotSelectsItem() throws Throwable { doTest('.') }
public void testSuggestExpectedTypeMembersNonImported() throws Throwable {
myFixture.addClass("package foo; public class Super { public static final Super FOO = null; }")
@@ -132,8 +132,13 @@ public class LibrariesDownloadAssistant {
@Override
public LibraryInfo fun(ArtifactItem artifactItem) {
String downloadUrl = artifactItem.getUrl();
if (!downloadUrl.startsWith("http://") && urlPrefix != null) {
downloadUrl = urlPrefix + downloadUrl;
if (urlPrefix != null) {
if (downloadUrl == null) {
downloadUrl = artifactItem.getName();
}
if (!downloadUrl.startsWith("http://")) {
downloadUrl = urlPrefix + downloadUrl;
}
}
return new LibraryInfo(artifactItem.getName(), downloadUrl, downloadUrl, artifactItem.getMD5(), artifactItem.getRequiredClasses());
}
@@ -66,7 +66,7 @@ public class SurroundWithHandler implements CodeInsightActionHandler{
}
public boolean startInWriteAction() {
return false;
return true;
}
public static void invoke(final Project project, final Editor editor, PsiFile file, Surrounder surrounder){
@@ -163,14 +163,14 @@ public class LookupTypedHandler extends TypedHandlerDelegate {
final LookupElement currentItem = lookup.getCurrentItem();
if (currentItem != null && charTyped != ' ') {
if (charTyped != '*' || filtersDecision != CharFilter.Result.SELECT_ITEM_AND_FINISH_LOOKUP) {
String postfix = lookup.getAdditionalPrefix() + charTyped;
final PrefixMatcher matcher = lookup.itemMatcher(currentItem);
if (matcher.cloneWithPrefix(matcher.getPrefix() + postfix).prefixMatches(currentItem)) {
if (charTyped == '*') {
return CharFilter.Result.ADD_TO_PREFIX;
}
for (final LookupElement element : lookup.getItems()) {
PrefixMatcher elementMatcher = lookup.itemMatcher(element);
if (elementMatcher.cloneWithPrefix(elementMatcher.getPrefix() + postfix).prefixMatches(element)) {
String postfix = lookup.getAdditionalPrefix() + charTyped;
final PrefixMatcher matcher = lookup.itemMatcher(currentItem);
for (String lookupString : currentItem.getAllLookupStrings()) {
if (lookupString.startsWith(matcher.getPrefix() + postfix)) {
return CharFilter.Result.ADD_TO_PREFIX;
}
}
@@ -27,6 +27,8 @@ public class LiveTemplateCharFilter extends CharFilter {
public Result acceptChar(char c, int prefixLength, Lookup lookup) {
LookupElement item = lookup.getCurrentItem();
if (item instanceof LiveTemplateLookupElement) {
if (Character.isJavaIdentifierPart(c)) return Result.ADD_TO_PREFIX;
if (c == ((LiveTemplateLookupElement)item).getTemplate().getShortcutChar()) {
return Result.SELECT_ITEM_AND_FINISH_LOOKUP;
}
@@ -103,28 +103,23 @@ public class SurroundWithTemplateHandler implements CodeInsightActionHandler {
}
public static ArrayList<TemplateImpl> getApplicableTemplates(Editor editor, PsiFile file, boolean selection) {
int offset = editor.getCaretModel().getOffset();
int startOffset = offset;
if (selection && editor.getSelectionModel().hasSelection()) {
final int selStart = editor.getSelectionModel().getSelectionStart();
final int selEnd = editor.getSelectionModel().getSelectionEnd();
startOffset = (offset == selStart) ? selEnd : selStart;
}
file = (PsiFile)file.copy();
final Document document = file.getViewProvider().getDocument();
assert document != null;
if (!selection) {
file = (PsiFile)file.copy();
final Document document = file.getViewProvider().getDocument();
assert document != null;
document.insertString(offset, CompletionUtil.DUMMY_IDENTIFIER_TRIMMED);
PsiDocumentManager.getInstance(file.getProject()).commitDocument(document);
int startOffset = editor.getCaretModel().getOffset();
if (selection && editor.getSelectionModel().hasSelection()) {
startOffset = editor.getSelectionModel().getSelectionStart();
document.deleteString(startOffset, editor.getSelectionModel().getSelectionEnd());
}
document.insertString(startOffset, CompletionUtil.DUMMY_IDENTIFIER_TRIMMED);
PsiDocumentManager.getInstance(file.getProject()).commitDocument(document);
ArrayList<TemplateImpl> list = new ArrayList<TemplateImpl>();
for (TemplateImpl template : TemplateSettings.getInstance().getTemplates()) {
if (!template.isDeactivated() &&
template.isSelectionTemplate() == selection &&
(TemplateManagerImpl.isApplicable(file, offset, template) ||
(selection && TemplateManagerImpl.isApplicable(file, startOffset, template)))) {
TemplateManagerImpl.isApplicable(file, startOffset, template)) {
list.add(template);
}
}
@@ -486,7 +486,6 @@ public class TemplateManagerImpl extends TemplateManager implements ProjectCompo
}
public static boolean isApplicable(PsiFile file, int offset, TemplateImpl template) {
TemplateManager instance = getInstance(file.getProject());
TemplateContext context = template.getTemplateContext();
if (isEnabled(file, offset, null, context)) {
return true;
@@ -22,6 +22,7 @@ import com.intellij.conversion.impl.ConversionContextImpl;
import com.intellij.conversion.impl.ConversionRunner;
import com.intellij.conversion.impl.ProjectConversionUtil;
import com.intellij.ide.IdeBundle;
import com.intellij.openapi.application.ApplicationNamesInfo;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.Messages;
@@ -65,8 +66,10 @@ public class ConvertProjectDialog extends DialogWrapper {
myBackupDir = ProjectConversionUtil.getBackupDir(context.getProjectBaseDir());
myTextPane.setSize(new Dimension(350, Integer.MAX_VALUE));
final String message =
IdeBundle.message("label.text.project.has.older.format", context.getProjectFile().getName(), myBackupDir.getAbsolutePath());
final String message = IdeBundle.message("label.text.project.has.older.format",
context.getProjectFile().getName(),
ApplicationNamesInfo.getInstance().getProductName(),
myBackupDir.getAbsolutePath());
Messages.configureMessagePaneUi(myTextPane, message, false);
myTextPane.addHyperlinkListener(new HyperlinkListener() {
@@ -145,7 +148,9 @@ public class ConvertProjectDialog extends DialogWrapper {
private boolean checkReadOnlyFiles() throws IOException {
List<File> files = getReadOnlyFiles();
if (!files.isEmpty()) {
final String message = IdeBundle.message("message.text.unlock.read.only.files", getFilesString(files));
final String message = IdeBundle.message("message.text.unlock.read.only.files",
ApplicationNamesInfo.getInstance().getProductName(),
getFilesString(files));
final String[] options = {CommonBundle.getContinueButtonText(), CommonBundle.getCancelButtonText()};
if (Messages.showOkCancelDialog(myMainPanel, message, IdeBundle.message("dialog.title.convert.project"), options[0], options[1], null) != 0) {
return false;
@@ -124,7 +124,7 @@ public class DirectoryChooser extends DialogWrapper {
});
final JComponent component = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, actionGroup, true).getComponent();
component.setBorder(null);
panel.add(component, BorderLayout.EAST);
panel.add(component, BorderLayout.WEST);
return panel;
}
@@ -23,6 +23,7 @@ import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.startup.StartupManager;
import com.intellij.openapi.util.Ref;
import com.intellij.openapi.vfs.ex.VirtualFileManagerEx;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -50,11 +51,12 @@ public class IdeaProjectManagerImpl extends ProjectManagerImpl {
}
@Nullable
protected Project convertAndLoadProject(String filePath, boolean convert) throws IOException {
public Project convertAndLoadProject(String filePath, boolean convert, Ref<Boolean> cancelled) throws IOException {
final ConversionResult conversionResult;
if (convert) {
conversionResult = convertProject(filePath);
if (conversionResult.openingIsCanceled()) {
cancelled.set(true);
return null;
}
}
@@ -25,6 +25,7 @@ import com.intellij.openapi.ui.popup.JBPopupFactory;
import com.intellij.openapi.ui.popup.LightweightWindowEvent;
import com.intellij.openapi.util.Pass;
import com.intellij.openapi.util.TextRange;
import com.intellij.psi.PsiElement;
import com.intellij.ui.components.JBList;
import javax.swing.*;
@@ -39,7 +40,7 @@ import java.util.List;
* User: anna
* Date: 10/14/10
*/
public abstract class OccurrencesChooser<T> {
public class OccurrencesChooser<T extends PsiElement> {
public static enum ReplaceChoice {
NO("Replace this occurrence only"), NO_WRITE("Replace all occurrences but write"), ALL("Replace all {0} occurrences");
@@ -141,7 +142,9 @@ public abstract class OccurrencesChooser<T> {
.createPopup().showInBestPositionFor(myEditor);
}
protected abstract TextRange getOccurrenceRange(T occurrence);
protected TextRange getOccurrenceRange(T occurrence) {
return occurrence.getTextRange();
}
private void dropHighlighters() {
for (RangeHighlighter highlight : myRangeHighlighters) {
@@ -28,13 +28,6 @@ public final class MouseShortcut extends Shortcut {
private final int myClickCount;
public MouseShortcut(int button, int modifiers, int clickCount) {
if (
MouseEvent.BUTTON1 != button &&
MouseEvent.BUTTON2 != button &&
MouseEvent.BUTTON3 != button
) {
throw new IllegalArgumentException("unknown button: " + button);
}
myButton = button;
// TODO[vova] check modifiers?
myModifiers = mapOldModifiers(modifiers);
@@ -128,7 +128,7 @@ public class KeymapUtil {
// do nothing
}
else {
throw new IllegalStateException("unknown button: " + button);
buttonNum = button;
}
if (clickCount == 1) {
@@ -801,7 +801,7 @@ public class KeymapImpl implements Keymap, ExternalizableScheme {
buffer.append(' ');
}
else {
throw new IllegalStateException("unknown button: " + button);
buffer.append("button").append(button);
}
if (shortcut.getClickCount() > 1) {
@@ -469,8 +469,8 @@ public class ProjectManagerImpl extends ProjectManagerEx implements NamedJDOMExt
}
@Nullable
protected Project convertAndLoadProject(String filePath, boolean convert) throws IOException {
return loadProjectWithProgress(filePath);
public Project convertAndLoadProject(String filePath, boolean convert, Ref<Boolean> cancelled) throws IOException {
return loadProjectWithProgress(filePath, cancelled);
}
@Nullable
@@ -481,7 +481,7 @@ public class ProjectManagerImpl extends ProjectManagerEx implements NamedJDOMExt
@Override
public void run() {
try {
final Project project = convertAndLoadProject(filePath, convert);
final Project project = convertAndLoadProject(filePath, convert, new Ref<Boolean>());
if (project == null) {
return;
}
@@ -832,11 +832,11 @@ public class IdeStatusBarImpl extends JComponent implements StatusBarEx {
}
Set<Integer> vks = ToolWindowManagerImpl.getActivateToolWindowVKs();
String text = "Click to show/hide tool windows side bars";
String text = "Click to show or hide the tool window bars";
if (vks.size() == 1) {
Integer stroke = vks.iterator().next();
String keystrokeText = KeymapUtil.getKeystrokeText(KeyStroke.getKeyStroke(stroke.intValue(), 0));
text += ".\nUse double click of " + keystrokeText + " to popup them when hidden";
text += ".\nDouble-press and hold " + keystrokeText + " to show tool window bars when hidden.";
}
if (!text.equals(getToolTipText())) {
setToolTipText(text);
@@ -113,7 +113,7 @@ public class PlatformProjectOpenProcessor extends ProjectOpenProcessor {
Ref<Boolean> cancelled = new Ref<Boolean>();
if (projectDir.exists()) {
try {
project = ((ProjectManagerImpl) projectManager).loadProjectWithProgress(baseDir.getPath(), cancelled);
project = ((ProjectManagerImpl) projectManager).convertAndLoadProject(baseDir.getPath(), true, cancelled);
}
catch (Exception e) {
// ignore
@@ -234,12 +234,12 @@ error.project.file.is.corrupted=Project file is corrupted
title.cannot.convert.project=Cannot Convert Project
dialog.title.convert.project=Convert Project
label.text.project.has.older.format=<html><body>The project ''{0}'' has an older format and will be converted. You won''t be able to open the project by earlier versions of IDEA. <a href="details">Details</a><br/>\
Old versions of project files will be saved to: ''{1}''</body></html>
message.text.unlock.read.only.files=<html><body>The following files are read only. IDEA will unlock them.<br>{0}</body></html>
label.text.project.has.older.format=<html><body>The project ''{0}'' has an older format and will be converted. You may not be able to open the project with earlier versions of {1}. <a href="details">Details</a><br/>\
Old versions of project files will be saved to: ''{2}''</body></html>
message.text.unlock.read.only.files=<html><body>The following files are read only. {0} will unlock them.<br>{1}</body></html>
error.message.cannot.make.files.writable=Cannot make the following files writable:\n{0}
error.cannot.convert.project=Cannot convert project: {0}
message.files.doesn.t.exists.0.so.the.corresponding.modules.won.t.be.converted.do.you.want.to.continue=<html><body>The following files doesn''t exists: <br>\
message.files.doesn.t.exists.0.so.the.corresponding.modules.won.t.be.converted.do.you.want.to.continue=<html><body>The following files don''t exists: <br>\
{0}The corresponding modules won''t be converted. Do you want to continue?</body></html>
select.in.project.settings=Project Structure
@@ -495,4 +495,6 @@
<extensionPoint name="patternProvider"
interface="com.intellij.codeInsight.generation.PatternProvider"/>
<extensionPoint name="project.converterProvider"
interface="com.intellij.conversion.ConverterProvider"/>
</extensionPoints>
@@ -156,6 +156,9 @@
<applicationService serviceInterface="com.intellij.psi.impl.source.codeStyle.IndentHelper"
serviceImplementation="com.intellij.psi.impl.source.codeStyle.IndentHelperImpl"/>
<applicationService serviceInterface="com.intellij.conversion.ConversionService"
serviceImplementation="com.intellij.conversion.impl.ConversionServiceImpl"/>
<projectService serviceInterface="com.intellij.ui.EditorTextFieldProvider"
serviceImplementation="com.intellij.ui.EditorTextFieldProviderImpl"/>
@@ -678,4 +681,5 @@
<editorTabTitleProvider implementation="com.intellij.openapi.fileEditor.impl.UniqueNameEditorTabTitleProvider"/>
<fileDocumentManagerListener implementation="com.intellij.openapi.fileEditor.impl.TrailingSpacesStripper"/>
</extensions>
@@ -17,9 +17,9 @@
</component>
<component>
<interface-class>com.intellij.openapi.project.ProjectManager</interface-class>
<implementation-class>com.intellij.openapi.project.impl.ProjectManagerImpl</implementation-class>
<implementation-class>com.intellij.openapi.project.impl.IdeaProjectManagerImpl</implementation-class>
</component>
<component>
<component>
<interface-class>com.intellij.ide.RecentProjectsManagerBase</interface-class>
<implementation-class>com.intellij.ide.RecentDirectoryProjectsManager</implementation-class>
</component>
@@ -16,6 +16,7 @@
package com.siyeh.ipp.types;
import com.intellij.psi.*;
import com.intellij.psi.codeStyle.CodeStyleManager;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.util.IncorrectOperationException;
import com.siyeh.ipp.base.Intention;
@@ -63,6 +64,6 @@ public class ReplaceDiamondWithExplicitTypeArgumentsIntention extends Intention
JavaPsiFacade.getElementFactory(element.getProject());
final PsiJavaCodeReferenceElement newReference =
elementFactory.createReferenceFromText(text.toString(), element);
javaCodeReferenceElement.replace(newReference);
CodeStyleManager.getInstance(javaCodeReferenceElement.getProject()).reformat(javaCodeReferenceElement.replace(newReference));
}
}
@@ -0,0 +1,4 @@
import java.util.HashMap;
class Test {
HashMap<Integer, String> map = new HashMap<<caret>>();
}
@@ -0,0 +1,4 @@
import java.util.HashMap;
class Test {
HashMap<Integer, String> map = new HashMap<Integer, String>();
}
@@ -27,6 +27,10 @@ public class ReplaceDiamondWithExplicitTypeIntentionTest extends IPPTestCase {
doTest();
}
public void testApplicableDiamondCheckFormatting() {
doTest();
}
public void testExplicitTypeArgs() {
doTest();
}
@@ -1,54 +1,52 @@
package org.jetbrains.plugins.groovy.lang.psi;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiPrimitiveType;
import com.intellij.psi.PsiType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrVariable;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.blocks.GrClosableBlock;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.params.GrParameter;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.params.GrParameterList;
import org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.TypesUtil;
import org.jetbrains.plugins.groovy.lang.psi.impl.synthetic.ClosureSyntheticParameter;
import java.util.Arrays;
import java.util.List;
/**
* @author peter
*/
public abstract class AbstractClosureParameterEnhancer extends GrVariableEnhancer {
@Override
public PsiType getVariableType(GrVariable variable) {
public final PsiType getVariableType(GrVariable variable) {
if (!(variable instanceof GrParameter)) {
return null;
}
assert variable.isValid();
GrClosableBlock closure = variable instanceof ClosureSyntheticParameter
? ((ClosureSyntheticParameter)variable).getClosure() : findClosureWithArgument(variable.getParent());
if (closure == null) {
return null;
GrClosableBlock closure;
int paramIndex;
if (variable instanceof ClosureSyntheticParameter) {
closure = ((ClosureSyntheticParameter)variable).getClosure();
paramIndex = 0;
}
else {
PsiElement eParameterList = variable.getParent();
if (!(eParameterList instanceof GrParameterList)) return null;
PsiElement eClosure = eParameterList.getParent();
if (!(eClosure instanceof GrClosableBlock)) return null;
closure = (GrClosableBlock)eClosure;
GrParameterList parameterList = (GrParameterList)eParameterList;
paramIndex = parameterList.getParameterNumber((GrParameter)variable);
}
assert closure.isValid();
PsiType res = getClosureParameterType(closure, paramIndex);
List<GrParameter> parameters = Arrays.asList(closure.getAllParameters());
@SuppressWarnings({"SuspiciousMethodCalls"})
int index = parameters.indexOf(variable);
assert index >= 0 : parameters + "; " + variable;
return TypesUtil.boxPrimitiveType(getClosureParameterType(closure, index), closure.getManager(), closure.getResolveScope());
}
@Nullable
private static GrClosableBlock findClosureWithArgument(@NotNull PsiElement parent) {
if (parent instanceof GrParameterList) {
GrParameterList list = (GrParameterList)parent;
if (list.getParent() instanceof GrClosableBlock) {
return (GrClosableBlock)list.getParent();
}
if (res instanceof PsiPrimitiveType) {
return ((PsiPrimitiveType)res).getBoxedType(closure);
}
return null;
return res;
}
@Nullable
@@ -44,26 +44,20 @@ public class IDEARemoteTestRunnerClient extends AbstractRemoteTestRunnerClient
cause.printStackTrace();
}
};
new Thread() {
@Override
public void run() {
try {
messageSender.initReceiver();
}
catch (SocketTimeoutException e) {
e.printStackTrace();
}
startListening(new IRemoteSuiteListener[]{myListener},
new IRemoteTestListener[]{myListener},
srvConnection
);
}
}.start();
try {
messageSender.initReceiver();
}
catch (SocketTimeoutException e) {
e.printStackTrace();
}
startListening(new IRemoteSuiteListener[]{myListener},
new IRemoteTestListener[]{myListener},
srvConnection);
}
@Override
protected void notifyStart(final GenericMessage genericMessage) {
ApplicationManager.getApplication().invokeAndWait(new Runnable()
ApplicationManager.getApplication().invokeLater(new Runnable()
{
public void run() {
for (final IRemoteSuiteListener listener : m_suiteListeners) {
@@ -75,7 +69,7 @@ public class IDEARemoteTestRunnerClient extends AbstractRemoteTestRunnerClient
@Override
protected void notifySuiteEvents(final SuiteMessage suiteMessage) {
ApplicationManager.getApplication().invokeAndWait(new Runnable()
ApplicationManager.getApplication().invokeLater(new Runnable()
{
public void run() {
for (final IRemoteSuiteListener listener : m_suiteListeners) {
@@ -91,7 +85,7 @@ public class IDEARemoteTestRunnerClient extends AbstractRemoteTestRunnerClient
@Override
protected void notifyTestEvents(final TestMessage testMessage) {
ApplicationManager.getApplication().invokeAndWait(new Runnable()
ApplicationManager.getApplication().invokeLater(new Runnable()
{
public void run() {
for (final IRemoteTestListener listener : m_testListeners) {
@@ -107,7 +101,7 @@ public class IDEARemoteTestRunnerClient extends AbstractRemoteTestRunnerClient
@Override
protected void notifyResultEvents(final TestResultMessage testResultMessage) {
ApplicationManager.getApplication().invokeAndWait(new Runnable()
ApplicationManager.getApplication().invokeLater(new Runnable()
{
public void run() {
for (final IRemoteTestListener listener : m_testListeners) {
@@ -31,9 +31,6 @@
<xi:include href="/META-INF/VcsExtensionPoints.xml" xpointer="xpointer(/extensionPoints/*)"/>
<xi:include href="/META-INF/LangExtensionPoints.xml" xpointer="xpointer(/extensionPoints/*)"/>
<extensionPoint name="project.converterProvider"
interface="com.intellij.conversion.ConverterProvider"/>
<extensionPoint name="antBuildGen"
interface="com.intellij.compiler.ant.ChunkBuildExtension"/>
@@ -173,9 +170,6 @@
<projectService serviceInterface="com.intellij.lang.injection.InjectedLanguageManager"
serviceImplementation="com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl"/>
<applicationService serviceInterface="com.intellij.conversion.ConversionService"
serviceImplementation="com.intellij.conversion.impl.ConversionServiceImpl"/>
<projectService serviceInterface="com.intellij.codeInsight.ExternalAnnotationsManager"
serviceImplementation="com.intellij.codeInsight.ExternalAnnotationsManagerImpl"/>
-4
View File
@@ -39,7 +39,6 @@
<context>
<option name="JAVA_CODE" value="false" />
<option name="JAVA_STATEMENT" value="true" />
<option name="ASPECTJ" value="true" />
</context>
</template>
<template name="RL" resource-bundle="messages.CodeInsightBundle" key="livetemplate.description.surround.with.read.lock"
@@ -49,7 +48,6 @@
<context>
<option name="JAVA_CODE" value="false" />
<option name="JAVA_STATEMENT" value="true" />
<option name="ASPECTJ" value="true" />
</context>
</template>
<template name="WL" resource-bundle="messages.CodeInsightBundle" key="livetemplate.description.surround.with.write.lock"
@@ -59,7 +57,6 @@
<context>
<option name="JAVA_CODE" value="false" />
<option name="JAVA_STATEMENT" value="true" />
<option name="ASPECTJ" value="true" />
</context>
</template>
<template name="I" value="for ($ELEMENT_TYPE$ $VAR$ : $SELECTION$) {&#10; $END$&#10;}&#10;"
@@ -70,7 +67,6 @@
<context>
<option name="JAVA_CODE" value="false" />
<option name="JAVA_STATEMENT" value="true" />
<option name="ASPECTJ" value="true" />
</context>
</template>
</templateSet>
@@ -89,6 +89,7 @@ public class XmlCharFilter extends CharFilter {
if (Character.isJavaIdentifierPart(c)) return Result.ADD_TO_PREFIX;
switch(c){
case '-':
case ':':
return Result.ADD_TO_PREFIX;
case '/':
if (isWithinTag(lookup)) {