import com.intellij.codeInsight.lookup.LookupElementBuilder;
import com.intellij.codeInsight.lookup.TailTypeDecorator;
import com.intellij.patterns.ElementPattern;
-import static com.intellij.patterns.PlatformPatterns.psiElement;
import com.intellij.psi.PsiElement;
import com.intellij.util.Icons;
import com.intellij.util.ProcessingContext;
import javax.swing.*;
+import static com.intellij.patterns.PlatformPatterns.psiElement;
+
/**
- * Created by IntelliJ IDEA.
- * User: vnikolaenko
- * Date: 22.09.2008
- * Time: 12:14:14
- * To change this template use File | Settings | File Templates.
+ * @author vnikolaenko
*/
public class RegExpCompletionContributor extends CompletionContributor {
private static final Icon emptyIcon = new EmptyIcon(Icons.PROPERTY_ICON.getIconWidth(), Icons.PROPERTY_ICON.getIconHeight());
import org.jetbrains.annotations.Nullable;
/**
- * Created by IntelliJ IDEA.
- * User: vnikolaenko
- * Date: 17.09.2008
- * Time: 19:24:29
- * To change this template use File | Settings | File Templates.
+ * @author vnikolaenko
*/
public class RegExpDocumentationProvider extends QuickDocumentationProvider {
@Override
*/
package com.intellij.uiDesigner.compiler;
+import org.objectweb.asm.Type;
import org.objectweb.asm.commons.GeneratorAdapter;
import org.objectweb.asm.commons.Method;
-import org.objectweb.asm.Type;
import java.awt.*;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 22.11.2005
- * Time: 17:46:41
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class InsetsPropertyCodeGenerator extends PropertyCodeGenerator {
private final Type myInsetsType = Type.getType(Insets.class);
public void generatePushValue(final GeneratorAdapter generator, final Object value) {
- final Insets insets = (Insets) value;
+ final Insets insets = (Insets)value;
generator.newInstance(myInsetsType);
generator.dup();
generator.push(insets.top);
import java.awt.*;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 23.11.2005
- * Time: 13:47:38
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class GridBagConverterTest extends TestCase {
/**
assertEquals(100, field3.getHeight());
}
- private void applyConversionResults(final JPanel panel, final GridBagConverter converter) {
+ private static void applyConversionResults(final JPanel panel, final GridBagConverter converter) {
GridBagConverter.Result[] results = converter.convert();
for(int i=0; i<results.length; i++) {
GridBagConverter.Result result = results [i];
import com.intellij.openapi.actionSystem.IdeActions;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 14, 2004
- * Time: 11:15:59 AM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class EditFrameSourceAction extends GotoFrameSourceAction{
public void update(AnActionEvent e) {
import com.intellij.openapi.actionSystem.AnActionEvent;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 14, 2004
- * Time: 3:35:58 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
-public class FreezeThreadAction extends DebuggerAction{
+public class FreezeThreadAction extends DebuggerAction {
public void actionPerformed(final AnActionEvent e) {
DebuggerTreeNodeImpl[] selectedNode = getSelectedNodes(e.getDataContext());
+ if (selectedNode == null) {
+ return;
+ }
final DebuggerContextImpl debuggerContext = getDebuggerContext(e.getDataContext());
final DebugProcessImpl debugProcess = debuggerContext.getDebugProcess();
- for (int i = 0; i < selectedNode.length; i++) {
- final DebuggerTreeNodeImpl debuggerTreeNode = selectedNode[i];
+ for (final DebuggerTreeNodeImpl debuggerTreeNode : selectedNode) {
ThreadDescriptorImpl threadDescriptor = ((ThreadDescriptorImpl)debuggerTreeNode.getDescriptor());
final ThreadReferenceProxyImpl thread = threadDescriptor.getThreadReference();
- if(!threadDescriptor.isFrozen()) {
+ if (!threadDescriptor.isFrozen()) {
debugProcess.getManagerThread().schedule(new SuspendContextCommandImpl(debuggerContext.getSuspendContext()) {
- public void contextAction() throws Exception {
- debugProcess.createFreezeThreadCommand(thread).run();
- debuggerTreeNode.calcValue();
- }
- });
+ public void contextAction() throws Exception {
+ debugProcess.createFreezeThreadCommand(thread).run();
+ debuggerTreeNode.calcValue();
+ }
+ });
}
}
}
public void update(AnActionEvent e) {
DebuggerTreeNodeImpl[] selectedNode = getSelectedNodes(e.getDataContext());
+ if (selectedNode == null) {
+ return;
+ }
DebugProcessImpl debugProcess = getDebuggerContext(e.getDataContext()).getDebugProcess();
boolean visible = false;
- if(debugProcess != null) {
+ if (debugProcess != null) {
visible = true;
- for (int i = 0; i < selectedNode.length; i++) {
- NodeDescriptorImpl threadDescriptor = selectedNode[i].getDescriptor();
- if(!(threadDescriptor instanceof ThreadDescriptorImpl) || ((ThreadDescriptorImpl)threadDescriptor).isFrozen()) {
+ for (DebuggerTreeNodeImpl aSelectedNode : selectedNode) {
+ NodeDescriptorImpl threadDescriptor = aSelectedNode.getDescriptor();
+ if (!(threadDescriptor instanceof ThreadDescriptorImpl) || ((ThreadDescriptorImpl)threadDescriptor).isFrozen()) {
visible = false;
break;
}
import com.intellij.openapi.project.Project;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 14, 2004
- * Time: 10:36:59 AM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public abstract class GotoFrameSourceAction extends DebuggerAction{
public void actionPerformed(AnActionEvent e) {
import com.intellij.openapi.project.Project;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Jun 26, 2003
- * Time: 12:52:01 PM
- * To change this template use Options | File Templates.
+ * @author lex
*/
public class HotSwapAction extends AnAction{
*/
package com.intellij.debugger.engine;
-import com.intellij.debugger.engine.DebugProcess;
import com.intellij.execution.ExecutionException;
import com.intellij.execution.configurations.RemoteConnection;
import com.intellij.execution.configurations.RunProfileState;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Feb 26, 2004
- * Time: 4:11:18 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class DebugProcessAdapterImpl implements DebugProcessListener {
//executed in manager thread
import com.sun.jdi.request.MethodExitRequest;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Feb 25, 2004
- * Time: 4:39:03 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class DebugProcessEvents extends DebugProcessImpl {
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.engine.DebugProcessEvents");
package com.intellij.debugger.engine;
import com.intellij.debugger.engine.evaluation.EvaluateException;
-import com.intellij.debugger.engine.DebugProcess;
-import com.intellij.debugger.engine.evaluation.EvaluateException;
-import com.intellij.debugger.engine.evaluation.EvaluateException;
-import com.intellij.openapi.project.Project;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 2, 2004
- * Time: 3:50:51 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public interface JVMName {
String getName(DebugProcessImpl process) throws EvaluateException;
+
String getDisplayName(DebugProcessImpl debugProcess);
}
import java.util.List;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 2, 2004
- * Time: 8:33:41 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class PositionManagerImpl implements PositionManager {
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.engine.PositionManagerImpl");
import org.jetbrains.annotations.NotNull;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 29, 2004
- * Time: 6:27:18 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class RemoteStateState implements RemoteState {
private final Project myProject;
import java.util.concurrent.ConcurrentLinkedQueue;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Feb 24, 2004
- * Time: 8:04:50 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public abstract class SuspendContextImpl implements SuspendContext {
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.engine.SuspendContextImpl");
import java.util.*;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Feb 24, 2004
- * Time: 8:04:01 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class SuspendManagerImpl implements SuspendManager {
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.engine.SuspendManager");
private final LinkedList<SuspendContextImpl> myEventContexts = new LinkedList<SuspendContextImpl>();
- // contexts, paused at breakpoint or another debugger event requests. Note that thread, explicitly paused by user is not considered as
- // "paused at breakpoint" and JDI prohibits data queries on its stackframes
+ /**
+ * contexts, paused at breakpoint or another debugger event requests. Note that thread, explicitly paused by user is not considered as
+ * "paused at breakpoint" and JDI prohibits data queries on its stackframes
+ */
private final LinkedList<SuspendContextImpl> myPausedContexts = new LinkedList<SuspendContextImpl>();
private final Set<ThreadReferenceProxyImpl> myFrozenThreads = Collections.synchronizedSet(new HashSet<ThreadReferenceProxyImpl>());
*/
package com.intellij.debugger.engine.evaluation;
-import com.intellij.debugger.engine.evaluation.EvaluateException;
-
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Jan 14, 2004
- * Time: 2:18:59 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
-public class EvaluateRuntimeException extends RuntimeException{
+public class EvaluateRuntimeException extends RuntimeException {
public EvaluateRuntimeException(EvaluateException e) {
super(e);
}
import java.util.EventListener;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Feb 3, 2004
- * Time: 7:19:30 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
-public interface EvaluationListener extends EventListener{
- public void evaluationStarted(SuspendContextImpl context);
- public void evaluationFinished(SuspendContextImpl context);
+public interface EvaluationListener extends EventListener {
+ void evaluationStarted(SuspendContextImpl context);
+
+ void evaluationFinished(SuspendContextImpl context);
}
import com.sun.jdi.*;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Mar 24, 2004
- * Time: 11:10:41 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class AssignmentEvaluator implements Evaluator{
private final Evaluator myLeftEvaluator;
*/
package com.intellij.debugger.engine.evaluation.expression;
-import com.intellij.debugger.engine.evaluation.EvaluationContextImpl;
-import com.intellij.debugger.engine.evaluation.EvaluateException;
import com.intellij.debugger.engine.evaluation.EvaluateException;
+import com.intellij.debugger.engine.evaluation.EvaluationContextImpl;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 20, 2004
- * Time: 5:21:10 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
-public class BlockStatementEvaluator implements Evaluator{
- protected Evaluator [] myStatements;
+public class BlockStatementEvaluator implements Evaluator {
+ protected Evaluator[] myStatements;
public BlockStatementEvaluator(Evaluator[] statements) {
myStatements = statements;
public Object evaluate(EvaluationContextImpl context) throws EvaluateException {
Object result = context.getSuspendContext().getDebugProcess().getVirtualMachineProxy().mirrorOf();
- for (int i = 0; i < myStatements.length; i++) {
- Evaluator statement = myStatements[i];
+ for (Evaluator statement : myStatements) {
result = statement.evaluate(context);
}
return result;
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 20, 2004
- * Time: 7:27:10 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
-public abstract class BreakContinueStatementEvaluator implements Evaluator{
+public class BreakContinueStatementEvaluator {
+ private BreakContinueStatementEvaluator() {
+ }
+
public static Evaluator createBreakEvaluator(final String labelName) {
return new Evaluator() {
public Object evaluate(EvaluationContextImpl context) throws BreakException {
*/
package com.intellij.debugger.engine.evaluation.expression;
-import com.intellij.debugger.engine.evaluation.EvaluateException;
import com.intellij.debugger.DebuggerBundle;
+import com.intellij.debugger.engine.evaluation.EvaluateException;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 20, 2004
- * Time: 7:12:47 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class BreakException extends EvaluateException{
private final String myLabelName;
*/
package com.intellij.debugger.engine.evaluation.expression;
+import com.intellij.debugger.DebuggerBundle;
import com.intellij.debugger.engine.evaluation.EvaluateException;
import com.intellij.debugger.engine.evaluation.EvaluateExceptionUtil;
import com.intellij.debugger.jdi.VirtualMachineProxyImpl;
-import com.intellij.debugger.DebuggerBundle;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.util.containers.HashMap;
import com.sun.jdi.Value;
import java.util.Map;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Mar 24, 2004
- * Time: 10:45:50 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class CodeFragmentEvaluator extends BlockStatementEvaluator{
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.engine.evaluation.expression.CodeFragmentEvaluator");
*/
package com.intellij.debugger.engine.evaluation.expression;
-import com.intellij.debugger.engine.evaluation.EvaluateException;
import com.intellij.debugger.DebuggerBundle;
+import com.intellij.debugger.engine.evaluation.EvaluateException;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 20, 2004
- * Time: 7:12:47 PM
- * To change this template use File | Settings | File Templates.
+ * @authorlex
*/
public class ContinueException extends EvaluateException{
private final String myLabelName;
import com.sun.jdi.BooleanValue;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 20, 2004
- * Time: 5:03:47 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class ForStatementEvaluator implements Evaluator {
private final Evaluator myInitializationEvaluator;
private final Evaluator myBodyEvaluator;
private Modifier myModifier;
- private final String myLabelName;
+ private final String myLabelName;
- public ForStatementEvaluator(Evaluator initializationEvaluator, Evaluator conditionEvaluator, Evaluator updateEvaluator, Evaluator bodyEvaluator, String labelName) {
+ public ForStatementEvaluator(Evaluator initializationEvaluator,
+ Evaluator conditionEvaluator,
+ Evaluator updateEvaluator,
+ Evaluator bodyEvaluator,
+ String labelName) {
myInitializationEvaluator = initializationEvaluator;
myConditionEvaluator = conditionEvaluator;
myUpdateEvaluator = updateEvaluator;
public Object evaluate(EvaluationContextImpl context) throws EvaluateException {
Object value = context.getDebugProcess().getVirtualMachineProxy().mirrorOf();
- if(myInitializationEvaluator != null) {
+ if (myInitializationEvaluator != null) {
value = myInitializationEvaluator.evaluate(context);
myModifier = myInitializationEvaluator.getModifier();
}
- for (;;) {
- if(myConditionEvaluator != null) {
+ while (true) {
+ if (myConditionEvaluator != null) {
value = myConditionEvaluator.evaluate(context);
myModifier = myConditionEvaluator.getModifier();
- if(!(value instanceof BooleanValue)) {
+ if (!(value instanceof BooleanValue)) {
throw EvaluateExceptionUtil.BOOLEAN_EXPECTED;
- } else {
- if(!((BooleanValue)value).booleanValue()) {
+ }
+ else {
+ if (!((BooleanValue)value).booleanValue()) {
break;
}
}
myBodyEvaluator.evaluate(context);
}
catch (BreakException e) {
- if(Comparing.equal(e.getLabelName(), myLabelName)) {
+ if (Comparing.equal(e.getLabelName(), myLabelName)) {
break;
- } else
+ }
+ else {
throw e;
+ }
}
catch (ContinueException e) {
- if(Comparing.equal(e.getLabelName(), myLabelName)) {
+ if (Comparing.equal(e.getLabelName(), myLabelName)) {
//continue;
- } else
+ }
+ else {
throw e;
+ }
}
- if(myUpdateEvaluator != null) {
+ if (myUpdateEvaluator != null) {
value = myUpdateEvaluator.evaluate(context);
myModifier = myUpdateEvaluator.getModifier();
}
*/
package com.intellij.debugger.engine.evaluation.expression;
-import com.intellij.debugger.engine.evaluation.EvaluationContextImpl;
-import com.intellij.debugger.engine.evaluation.EvaluateExceptionUtil;
-import com.intellij.debugger.engine.evaluation.EvaluateException;
import com.intellij.debugger.engine.evaluation.EvaluateException;
+import com.intellij.debugger.engine.evaluation.EvaluateExceptionUtil;
+import com.intellij.debugger.engine.evaluation.EvaluationContextImpl;
import com.sun.jdi.BooleanValue;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 20, 2004
- * Time: 5:03:47 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class IfStatementEvaluator implements Evaluator {
private final Evaluator myConditionEvaluator;
+++ /dev/null
-/*
- * Copyright 2000-2009 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.intellij.debugger.engine.evaluation.expression;
-
-import com.intellij.openapi.diagnostic.Logger;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Mar 24, 2004
- * Time: 10:36:12 PM
- * To change this template use File | Settings | File Templates.
- */
-public class MapStack<Key, Value> {
- private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.engine.evaluation.expression.MapStack");
-
- private final LinkedList<HashMap<Key, Value>> myStack;
-
- public MapStack() {
- myStack = new LinkedList<HashMap<Key,Value>>();
- push();
- }
-
- public void push(){
- myStack.addFirst(new HashMap<Key, Value>());
- }
-
- public void pop(){
- myStack.removeFirst();
- LOG.assertTrue(myStack.size() > 0);
- }
-
- private HashMap<Key, Value> current() {
- return myStack.getFirst();
- }
-
- public void put(Key key, Value value) {
- current().put(key, value);
- }
-
- public boolean containsKey(Key key){
- for (Iterator<HashMap<Key, Value>> iterator = myStack.iterator(); iterator.hasNext();) {
- HashMap<Key, Value> hashMap = iterator.next();
- if(hashMap.containsKey(key))return true;
- }
- return false;
- }
-
- public Value get(Key key) {
- for (Iterator<HashMap<Key, Value>> iterator = myStack.iterator(); iterator.hasNext();) {
- HashMap<Key, Value> hashMap = iterator.next();
- Value value = hashMap.get(key);
- if(value != null) return value;
- }
- return null;
- }
-}
import org.jetbrains.annotations.NonNls;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 20, 2004
- * Time: 5:34:50 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class PostfixOperationEvaluator implements Evaluator{
private final Evaluator myOperandEvaluator;
import com.intellij.debugger.engine.evaluation.EvaluateException;
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl;
import com.intellij.debugger.ui.impl.watch.NodeDescriptorImpl;
-import com.intellij.debugger.ui.impl.watch.NodeManagerImpl;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.sun.jdi.Type;
import com.sun.jdi.Value;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Mar 25, 2004
- * Time: 2:53:29 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class SyntheticVariableEvaluator implements Evaluator{
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.engine.evaluation.expression.SyntheticVariableEvaluator");
import com.sun.jdi.BooleanValue;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 20, 2004
- * Time: 5:03:47 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class WhileStatementEvaluator implements Evaluator {
private final Evaluator myConditionEvaluator;
public Object evaluate(EvaluationContextImpl context) throws EvaluateException {
Object value;
- for (;;) {
+ while (true) {
value = myConditionEvaluator.evaluate(context);
- if(!(value instanceof BooleanValue)) {
+ if (!(value instanceof BooleanValue)) {
throw EvaluateExceptionUtil.BOOLEAN_EXPECTED;
- } else {
- if(!((BooleanValue)value).booleanValue()) {
+ }
+ else {
+ if (!((BooleanValue)value).booleanValue()) {
break;
}
}
myBodyEvaluator.evaluate(context);
}
catch (BreakException e) {
- if(Comparing.equal(e.getLabelName(), myLabelName)) {
+ if (Comparing.equal(e.getLabelName(), myLabelName)) {
break;
- } else
+ }
+ else {
throw e;
+ }
}
catch (ContinueException e) {
- if(Comparing.equal(e.getLabelName(), myLabelName)) {
- continue;
- } else
+ if (!Comparing.equal(e.getLabelName(), myLabelName)) {
throw e;
+ }
}
}
import com.intellij.debugger.impl.DebuggerTaskImpl;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Mar 5, 2004
- * Time: 6:04:07 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public abstract class DebuggerCommandImpl extends DebuggerTaskImpl {
protected abstract void action() throws Exception;
+++ /dev/null
-/*
- * Copyright 2000-2009 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.intellij.debugger.impl;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Mar 31, 2004
- * Time: 4:58:01 PM
- * To change this template use File | Settings | File Templates.
- */
-public class CloseWorkerThreadException extends RuntimeException {
-}
package com.intellij.debugger.impl;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 7, 2004
- * Time: 2:40:47 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
-public interface DebuggerTask extends PrioritizedTask{
+public interface DebuggerTask extends PrioritizedTask {
void release();
+
void hold();
+
void waitFor();
}
package com.intellij.debugger.impl;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Feb 27, 2004
- * Time: 12:56:52 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public abstract class DebuggerTaskImpl implements DebuggerTask {
private boolean myOnHold = false;
package com.intellij.debugger.impl;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Feb 19, 2004
- * Time: 8:48:37 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
-public class EventQueueClosedException extends Exception{
+public class EventQueueClosedException extends Exception {
}
*/
package com.intellij.debugger.impl;
-
-
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Feb 24, 2004
- * Time: 3:27:55 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
-public abstract class InvokeAndWaitThread<E extends DebuggerTask> extends InvokeThread<E>{
+public abstract class InvokeAndWaitThread<E extends DebuggerTask> extends InvokeThread<E> {
public InvokeAndWaitThread() {
super();
}
- //Do not remove this code
- //Otherwise it will be impossible to override schedule method
+ /**
+ * !!! Do not remove this code !!!
+ * Otherwise it will be impossible to override schedule method
+ */
public void schedule(E e) {
super.schedule(e);
}
import java.util.concurrent.*;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Mar 19, 2004
- * Time: 11:42:03 AM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public abstract class InvokeThread<E extends PrioritizedTask> {
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.impl.InvokeThread");
try {
wait();
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignore) {
}
}
}
import javax.swing.*;
import java.io.IOException;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Mar 10, 2004
- * Time: 7:12:57 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
class ReloadClassesWorker {
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.impl.ReloadClassesWorker");
return myDebuggerSession.getProcess();
}
- private Project getProject() {
- return myDebuggerSession.getProject();
- }
-
private void processException(Throwable e) {
if (e.getMessage() != null) {
myProgress.addMessage(myDebuggerSession, MessageCategory.ERROR, e.getMessage());
virtualMachineProxy.suspend();
try {
- final Map<ReferenceType, byte[]> redefineMap = new java.util.HashMap<ReferenceType,byte[]>();
+ final Map<ReferenceType, byte[]> redefineMap = new HashMap<ReferenceType,byte[]>();
int processedClassesCount = 0;
final IOException[] _ex = new IOException[] {null};
for (final String qualifiedName : modifiedClasses.keySet()) {
+++ /dev/null
-/*
- * Copyright 2000-2009 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.intellij.debugger.ui;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Mar 31, 2004
- * Time: 7:48:44 PM
- * To change this template use File | Settings | File Templates.
- */
-public interface CompletedInputTextField {
-}
import java.util.List;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 12, 2004
- * Time: 2:46:02 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public abstract class DebuggerEditorImpl extends CompletionEditor{
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.ui.DebuggerEditorImpl");
if (document != null) {
PsiDocumentManager.getInstance(project).commitDocument(document);
PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(document);
- return createText(psiFile.getText(), ((JavaCodeFragment)psiFile).importsToString());
+ if (psiFile != null) {
+ return createText(psiFile.getText(), ((JavaCodeFragment)psiFile).importsToString());
+ }
}
return createText("");
import java.util.ListIterator;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 12, 2004
- * Time: 2:39:17 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class DebuggerStatementEditor extends DebuggerEditorImpl {
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.ui.DebuggerStatementEditor");
import java.awt.event.KeyEvent;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 12, 2004
- * Time: 4:28:52 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class StatementEvaluationDialog extends EvaluationDialog{
private final JPanel myPanel;
splitter.setFirstComponent(editorPanel);
- final EvaluationDialog.MyEvaluationPanel evaluationPanel = getEvaluationPanel();
+ final MyEvaluationPanel evaluationPanel = getEvaluationPanel();
final JPanel ep = new JPanel(new BorderLayout());
final JLabel resultLabel = new JLabel(DebuggerBundle.message("label.evaluate.dialog.result"));
ep.add(resultLabel, BorderLayout.NORTH);
private void updateSwitchButton(Document document) {
PsiDocumentManager.getInstance(getProject()).commitDocument(document);
PsiFile psiFile = PsiDocumentManager.getInstance(getProject()).getPsiFile(document);
+ if (psiFile == null) {
+ return;
+ }
PsiElement[] children = psiFile.getChildren();
int nonWhite = 0;
for (PsiElement child : children) {
private class SwitchAction extends AbstractAction {
public SwitchAction() {
- putValue(Action.NAME, DebuggerBundle.message("action.evaluate.statement.dialog.switch.mode.description"));
+ putValue(NAME, DebuggerBundle.message("action.evaluate.statement.dialog.switch.mode.description"));
}
public void actionPerformed(ActionEvent e) {
import java.awt.event.*;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Jan 29, 2004
- * Time: 4:23:11 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class TipManager implements Disposable, PopupMenuListener {
private MouseEvent myLastMouseEvent;
- public static interface TipFactory {
+ public interface TipFactory {
JComponent createToolTip (MouseEvent e);
MouseEvent createTooltipEvent(MouseEvent candiateEvent);
boolean isFocusOwner();
private boolean isInsideComponent(final MouseEvent e) {
final Rectangle compBounds = myComponent.getBounds();
final Point compPoint = SwingUtilities.convertPoint(e.getComponent(), e.getPoint(), myComponent);
- final boolean insideCoponent = compBounds.contains(compPoint);
- return insideCoponent;
+
+ return compBounds.contains(compPoint);
}
import java.util.List;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 12, 2004
- * Time: 5:24:17 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public abstract class EvaluationDescriptor extends ValueDescriptorImpl{
private Modifier myModifier;
import com.intellij.util.Function;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 29, 2004
- * Time: 6:33:26 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
-public abstract class DebuggerManager implements ProjectComponent, JDOMExternalizable{
+public abstract class DebuggerManager implements ProjectComponent, JDOMExternalizable {
public static DebuggerManager getInstance(Project project) {
return project.getComponent(DebuggerManager.class);
}
public abstract DebugProcess getDebugProcess(ProcessHandler processHandler);
- public abstract void addDebugProcessListener (ProcessHandler processHandler, DebugProcessListener listener);
+ public abstract void addDebugProcessListener(ProcessHandler processHandler, DebugProcessListener listener);
+
public abstract void removeDebugProcessListener(ProcessHandler processHandler, DebugProcessListener listener);
public abstract boolean isDebuggerManagerThread();
-
+
public abstract void addClassNameMapper(NameMapper mapper);
+
public abstract void removeClassNameMapper(NameMapper mapper);
-
- public abstract String getVMClassQualifiedName(PsiClass aClass);
-
- public abstract void registerPositionManagerFactory(Function<DebugProcess,PositionManager> factory);
+
+ public abstract String getVMClassQualifiedName(PsiClass aClass);
+
+ public abstract void registerPositionManagerFactory(Function<DebugProcess, PositionManager> factory);
+
public abstract void unregisterPositionManagerFactory(Function<DebugProcess, PositionManager> factory);
-
+
}
import java.util.List;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 2, 2004
- * Time: 7:17:18 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public interface DebugProcess {
@NonNls String JAVA_STRATUM = "Java";
import com.sun.jdi.*;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 8, 2004
- * Time: 4:38:36 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class EvaluateExceptionUtil {
public static final EvaluateException INCONSISTEND_DEBUG_INFO = createEvaluateException(DebuggerBundle.message("evaluation.error.inconsistent.debug.info"));
public static final EvaluateException THREAD_WAS_RESUMED = createEvaluateException(DebuggerBundle.message("evaluation.error.thread.resumed"));
public static final EvaluateException DEBUG_INFO_UNAVAILABLE = createEvaluateException(DebuggerBundle.message("evaluation.error.debug.info.unavailable"));
+ private EvaluateExceptionUtil() {
+ }
+
public static EvaluateException createEvaluateException(Throwable th) {
return createEvaluateException(null, th);
}
import java.util.List;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 2, 2004
- * Time: 8:49:42 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public interface VirtualMachineProxy {
List<ReferenceType> allClasses();
import org.jetbrains.annotations.NotNull;
/**
- * Created by IntelliJ IDEA.
- * User: ven
- * Date: Jul 14, 2004
- * Time: 4:45:46 PM
- * To change this template use File | Settings | File Templates.
+ * @author ven
*/
public interface ExpectedTypeInfo {
int TYPE_STRICTLY = 0;
PsiMethod getCalledMethod();
@NotNull
- PsiType getType ();
+ PsiType getType();
- PsiType getDefaultType ();
+ PsiType getDefaultType();
int getKind();
- boolean equals (ExpectedTypeInfo info);
+ boolean equals(ExpectedTypeInfo info);
String toString();
ExpectedTypeInfo[] intersect(ExpectedTypeInfo info);
- boolean isArrayTypeInfo ();
+ boolean isArrayTypeInfo();
TailType getTailType();
*/
package com.intellij.codeInsight.editorActions.smartEnter;
-import com.intellij.psi.*;
-import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.Editor;
+import com.intellij.psi.*;
+import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.util.IncorrectOperationException;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Jul 5, 2004
- * Time: 8:44:32 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class MissingForeachBodyFixer implements Fixer {
public void apply(Editor editor, JavaSmartEnterProcessor processor, PsiElement psiElement) throws IncorrectOperationException {
*/
package com.intellij.codeInsight.hint.api.impls;
+import com.intellij.codeInsight.lookup.LookupElement;
import com.intellij.lang.parameterInfo.*;
import com.intellij.psi.*;
import com.intellij.util.text.CharArrayUtil;
-import com.intellij.codeInsight.lookup.LookupElement;
import org.jetbrains.annotations.NonNls;
-import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Feb 1, 2006
- * Time: 3:16:16 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class AnnotationParameterInfoHandler implements ParameterInfoHandler<PsiAnnotationParameterList,PsiAnnotationMethod> {
public @Nullable Object[] getParametersForLookup(LookupElement item, ParameterInfoContext context) {
*/
package com.intellij.codeInsight.hint.api.impls;
+import com.intellij.codeInsight.lookup.LookupElement;
import com.intellij.lang.parameterInfo.*;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.*;
import com.intellij.util.Function;
-import com.intellij.codeInsight.lookup.LookupElement;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import java.util.Arrays;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Feb 1, 2006
- * Time: 3:16:09 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class ReferenceParameterInfoHandler implements ParameterInfoHandler<PsiReferenceParameterList,PsiTypeParameter> {
public Object[] getParametersForLookup(final LookupElement item, final ParameterInfoContext context) {
import com.intellij.codeInsight.template.TextResult;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim
- * Date: Nov 7, 2006
- * Time: 12:17:39 AM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim
*/
public class TextExpression extends Expression {
private final String myString;
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 01.09.2005
- * Time: 14:37:13
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class JavadocBundle {
private static Reference<ResourceBundle> ourBundle;
private JavadocBundle() {
}
- public static String message(@PropertyKey(resourceBundle = BUNDLE)String key, Object... params) {
+ public static String message(@PropertyKey(resourceBundle = BUNDLE) String key, Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
import java.util.*;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Apr 11, 2006
- * Time: 7:45:12 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class JavaDocumentationProvider implements CodeDocumentationProvider {
private static final String LINE_SEPARATOR = "\n";
return CodeInsightBundle.message("javadoc.candidates.not.found", text);
}
- private void createElementLink(@NonNls final StringBuffer sb, final PsiElement element, final String str) {
+ private static void createElementLink(@NonNls final StringBuffer sb, final PsiElement element, final String str) {
sb.append(" <a href=\"psi_element://");
sb.append(JavaDocUtil.getReferenceText(element.getProject(), element));
sb.append("\">");
JBPopupFactory.getInstance().createListPopup(new BaseListPopupStep<String>("Choose javadoc root", ArrayUtil.toStringArray(set)) {
public PopupStep onChosen(final String selectedValue, final boolean finalChoice) {
BrowserUtil.launchBrowser(selectedValue);
- return PopupStep.FINAL_CHOICE;
+ return FINAL_CHOICE;
}
}).showInBestPositionFor(DataManager.getInstance().getDataContext());
}
import org.jetbrains.annotations.NotNull;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Jan 22, 2005
- * Time: 11:16:59 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public class JavaLanguage extends Language {
public JavaLanguage() {
SyntaxHighlighterFactory.LANGUAGE_FACTORY.addExplicitExtension(this, new SyntaxHighlighterFactory() {
@NotNull
public SyntaxHighlighter getSyntaxHighlighter(final Project project, final VirtualFile virtualFile) {
- return new JavaFileHighlighter(virtualFile != null ? LanguageLevelUtil.getLanguageLevelForFile(virtualFile) : LanguageLevel.HIGHEST);
+ return new JavaFileHighlighter(
+ virtualFile != null ? LanguageLevelUtil.getLanguageLevelForFile(virtualFile) : LanguageLevel.HIGHEST);
}
});
}
import org.jetbrains.annotations.NotNull;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Jan 26, 2005
- * Time: 12:40:22 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public class JavaParserDefinition implements ParserDefinition {
private final TokenSet myStringLiteralElementSet = TokenSet.create(JavaElementType.LITERAL_EXPRESSION);
import org.jetbrains.annotations.NonNls;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Jul 21, 2005
- * Time: 7:42:23 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
-
public class ImportsFormatter extends XmlRecursiveElementVisitor {
private static final Logger LOG = Logger.getInstance("#com.intellij.psi.impl.source.codeStyle.ImportsFormatter");
}
}
- private boolean isPageDirectiveTag(final XmlTag tag) {
+ private static boolean isPageDirectiveTag(final XmlTag tag) {
return PAGE_DIRECTIVE.equals(tag.getName());
}
}
}
- private ASTNode findValueToken(final ASTNode node) {
+ private static ASTNode findValueToken(final ASTNode node) {
ASTNode child = node.getFirstChildNode();
while (child != null){
if (child.getElementType() == XmlElementType.XML_ATTRIBUTE_VALUE_TOKEN) return child;
return null;
}
- private boolean isImportAttribute(final XmlAttribute attribute) {
+ private static boolean isImportAttribute(final XmlAttribute attribute) {
return IMPORT_ATT.equals(attribute.getName());
}
import com.intellij.psi.PsiField;
import com.intellij.psi.PsiModifier;
import com.intellij.psi.PsiReference;
-import com.intellij.psi.util.PsiUtil;
import com.intellij.psi.impl.JavaConstantExpressionEvaluator;
import com.intellij.psi.javadoc.JavadocTagInfo;
import com.intellij.psi.javadoc.PsiDocTagValue;
+import com.intellij.psi.util.PsiUtil;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 10.08.2005
- * Time: 18:25:51
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class ValueDocTagInfo implements JavadocTagInfo {
public String getName() {
}
public PsiReference getReference(PsiDocTagValue value) {
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ return null;
}
}
*/
package com.intellij.psi.impl.source.parsing;
+import com.intellij.pom.java.LanguageLevel;
import com.intellij.psi.impl.source.ParsingContext;
import com.intellij.util.CharTable;
-import com.intellij.pom.java.LanguageLevel;
/**
- * Created by IntelliJ IDEA.
- * User: ik
- * Date: 07.06.2004
- * Time: 18:45:17
- * To change this template use File | Settings | File Templates.
+ * @author ik
*/
public class JavaParsingContext extends ParsingContext {
private final DeclarationParsing myDeclarationParsing;
import com.intellij.psi.PsiTypeVisitorEx;
/**
- * Created by IntelliJ IDEA.
- * User: db
- * Date: Dec 27, 2004
- * Time: 7:20:09 PM
- * To change this template use File | Settings | File Templates.
+ * @author db
*/
-public abstract class PsiExtendedTypeVisitor <X> extends PsiTypeVisitorEx<X> {
+public abstract class PsiExtendedTypeVisitor<X> extends PsiTypeVisitorEx<X> {
public X visitClassType(final PsiClassType classType) {
super.visitClassType(classType);
final PsiClassType.ClassResolveResult result = classType.resolveGenerics();
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.LinkedList;
/**
- * Created by IntelliJ IDEA.
- * User: db
- * Date: Jan 12, 2005
- * Time: 9:41:45 PM
- * To change this template use File | Settings | File Templates.
+ * @author db
*/
public class PsiTypeVariableFactory {
private int myCurrent = 0;
public final void registerCluster(final HashSet<PsiTypeVariable> cluster) {
myClusters.add(cluster);
- for (final Iterator<PsiTypeVariable> v = cluster.iterator(); v.hasNext();) {
- myVarCluster.put(new Integer(v.next().getIndex()), cluster);
+ for (final PsiTypeVariable aCluster : cluster) {
+ myVarCluster.put(new Integer(aCluster.getIndex()), cluster);
}
}
}
return type.accept(new PsiTypeVisitor<Boolean>() {
- public Boolean visitType(final PsiType type) {
- return Boolean.TRUE;
- }
-
- public Boolean visitArrayType(final PsiArrayType arrayType) {
- return arrayType.getDeepComponentType().accept(this);
- }
-
- public Boolean visitWildcardType(final PsiWildcardType wildcardType) {
- final PsiType bound = wildcardType.getBound();
-
- if (bound != null) {
- bound.accept(this);
- }
-
- return Boolean.TRUE;
- }
-
- public Boolean visitClassType(final PsiClassType classType) {
- final PsiClassType.ClassResolveResult result = classType.resolveGenerics();
- final PsiClass aClass = result.getElement();
- final PsiSubstitutor aSubst = result.getSubstitutor();
-
- if (aClass != null) {
- final PsiManager manager = aClass.getManager();
- final JavaPsiFacade facade = JavaPsiFacade.getInstance(manager.getProject());
-
- if (aClass instanceof PsiTypeParameter) {
- final PsiTypeParameterListOwner owner =
- PsiTreeUtil.getParentOfType(myContext, PsiTypeParameterListOwner.class);
-
- if (owner != null) {
- boolean found = false;
-
- for (PsiTypeParameter typeParameter : PsiUtil.typeParametersIterable(owner)) {
- found = manager.areElementsEquivalent(typeParameter, aClass);
- if (found) break;
- }
-
- if (!found) {
- return Boolean.FALSE;
- }
- }
- else {
- return Boolean.FALSE;
- }
- }
- else if (!facade.getResolveHelper().isAccessible(aClass, myContext, null)) {
- return Boolean.FALSE;
- }
-
- for (PsiTypeParameter parm : PsiUtil.typeParametersIterable(aClass)) {
- final PsiType type = aSubst.substitute(parm);
-
- if (type != null){
- final Boolean b = type.accept(this);
-
- if (! b.booleanValue()){
- return Boolean.FALSE;
- }
- }
- }
-
- return Boolean.TRUE;
- }
- else {
- return Boolean.FALSE;
- }
- }
- }).booleanValue();
+ public Boolean visitType(final PsiType type) {
+ return Boolean.TRUE;
+ }
+
+ public Boolean visitArrayType(final PsiArrayType arrayType) {
+ return arrayType.getDeepComponentType().accept(this);
+ }
+
+ public Boolean visitWildcardType(final PsiWildcardType wildcardType) {
+ final PsiType bound = wildcardType.getBound();
+
+ if (bound != null) {
+ bound.accept(this);
+ }
+
+ return Boolean.TRUE;
+ }
+
+ public Boolean visitClassType(final PsiClassType classType) {
+ final PsiClassType.ClassResolveResult result = classType.resolveGenerics();
+ final PsiClass aClass = result.getElement();
+ final PsiSubstitutor aSubst = result.getSubstitutor();
+
+ if (aClass != null) {
+ final PsiManager manager = aClass.getManager();
+ final JavaPsiFacade facade = JavaPsiFacade.getInstance(manager.getProject());
+
+ if (aClass instanceof PsiTypeParameter) {
+ final PsiTypeParameterListOwner owner = PsiTreeUtil.getParentOfType(myContext, PsiTypeParameterListOwner.class);
+
+ if (owner != null) {
+ boolean found = false;
+
+ for (PsiTypeParameter typeParameter : PsiUtil.typeParametersIterable(owner)) {
+ found = manager.areElementsEquivalent(typeParameter, aClass);
+ if (found) break;
+ }
+
+ if (!found) {
+ return Boolean.FALSE;
+ }
+ }
+ else {
+ return Boolean.FALSE;
+ }
+ }
+ else if (!facade.getResolveHelper().isAccessible(aClass, myContext, null)) {
+ return Boolean.FALSE;
+ }
+
+ for (PsiTypeParameter parm : PsiUtil.typeParametersIterable(aClass)) {
+ final PsiType type = aSubst.substitute(parm);
+
+ if (type != null) {
+ final Boolean b = type.accept(this);
+
+ if (!b.booleanValue()) {
+ return Boolean.FALSE;
+ }
+ }
+ }
+
+ return Boolean.TRUE;
+ }
+ else {
+ return Boolean.FALSE;
+ }
+ }
+ }).booleanValue();
}
public String getPresentableText() {
*/
package com.intellij.refactoring.typeCook.deductive.builder;
-import com.intellij.psi.PsiType;
import com.intellij.openapi.diagnostic.Logger;
+import com.intellij.psi.PsiType;
import com.intellij.refactoring.typeCook.deductive.resolver.Binding;
/**
- * Created by IntelliJ IDEA.
- * User: db
- * Date: Jul 20, 2004
- * Time: 6:00:28 PM
- * To change this template use File | Settings | File Templates.
+ * @author db
*/
public abstract class Constraint {
private static final Logger LOG = Logger.getInstance("#com.intellij.refactoring.typeCook.deductive.builder.Constraint");
import com.intellij.refactoring.typeCook.deductive.resolver.Binding;
/**
- * Created by IntelliJ IDEA.
- * User: db
- * Date: Jul 20, 2004
- * Time: 6:02:29 PM
- * To change this template use File | Settings | File Templates.
+ * @author db
*/
public class Subtype extends Constraint {
public Subtype(PsiType left, PsiType right) {
import java.util.HashSet;
/**
- * Created by IntelliJ IDEA.
- * User: db
- * Date: Jul 5, 2004
- * Time: 6:45:51 PM
- * To change this template use File | Settings | File Templates.
+ * @author db
*/
public class VictimCollector extends Visitor {
final HashSet<PsiElement> myVictims = new HashSet<PsiElement>();
import com.intellij.psi.*;
/**
- * Created by IntelliJ IDEA.
- * User: db
- * Date: Jul 5, 2004
- * Time: 6:44:49 PM
- * To change this template use File | Settings | File Templates.
+ * @author db
*/
public abstract class Visitor extends JavaRecursiveElementWalkingVisitor {
@Override public void visitPackage(final PsiPackage aPackage) {
final PsiDirectory[] dirs = aPackage.getDirectories();
- for (int i = 0; i < dirs.length; i++) {
- final PsiFile[] files = dirs[i].getFiles();
-
- for (int j = 0; j < files.length; j++) {
- final PsiFile file = files[j];
+ for (PsiDirectory dir : dirs) {
+ final PsiFile[] files = dir.getFiles();
+ for (final PsiFile file : files) {
if (file instanceof PsiJavaFile) {
super.visitJavaFile(((PsiJavaFile)file));
}
}
}
}
-}
\ No newline at end of file
+}
import com.intellij.JavaTestUtil;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Oct 14, 2004
- * Time: 4:39:37 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class CustomFileTypeCompletionTest extends LightCompletionTestCase {
private static final String BASE_PATH = "/codeInsight/completion/customFileType/";
import org.jetbrains.annotations.NotNull;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Oct 14, 2004
- * Time: 4:39:37 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class WordCompletionTest extends CompletionTestCase {
private static final String BASE_PATH = "/codeInsight/completion/word/";
*/
package com.intellij.lang.jsp;
-import org.jetbrains.annotations.Nullable;
-import org.jetbrains.annotations.NotNull;
+import com.intellij.psi.PsiFile;
import com.intellij.xml.XmlElementDescriptor;
import com.intellij.xml.XmlNSDescriptor;
-import com.intellij.psi.PsiFile;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: 20.04.2009
- * Time: 17:07:57
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public interface IBaseJspManager {
XmlNSDescriptor getActionsLibrary(@NotNull PsiFile containingFile);
import java.util.Set;
/**
- * Created by IntelliJ IDEA.
- * User: ik
- * Date: Dec 12, 2005
- * Time: 3:28:22 PM
- * To change this template use File | Settings | File Templates.
+ * @author ik
*/
public interface JspFileViewProvider extends JspxFileViewProvider {
@NotNull
Language getTemplateDataLanguage();
+
Set<String> getKnownTaglibPrefixes();
}
package com.intellij.lang.jsp;
-import com.intellij.lang.Language;
import com.intellij.lang.DependentLanguage;
+import com.intellij.lang.Language;
import com.intellij.psi.templateLanguages.TemplateLanguageFileViewProvider;
/**
- * Created by IntelliJ IDEA.
- * User: ik
- * Date: Dec 12, 2005
- * Time: 7:40:40 PM
- * To change this template use File | Settings | File Templates.
+ * @author ik
*/
public interface JspxFileViewProvider extends TemplateLanguageFileViewProvider {
Language JAVA_HOLDER_METHOD_TREE_LANGUAGE = new JavaHolderMethodTreeLanguage();
- public static class JavaHolderMethodTreeLanguage extends Language implements DependentLanguage{
+ class JavaHolderMethodTreeLanguage extends Language implements DependentLanguage{
public JavaHolderMethodTreeLanguage() {
super("JAVA_HOLDER_METHOD_TREE", "");
}
import com.intellij.psi.tree.IElementType;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: May 13, 2005
- * Time: 1:34:29 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public interface ELHostLexer {
- void setElTypes(IElementType elTokenTypeForContent,IElementType elTokenTypeForAttribute);
+ void setElTypes(IElementType elTokenTypeForContent, IElementType elTokenTypeForAttribute);
}
import org.jetbrains.annotations.Nullable;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Jan 26, 2007
- * Time: 7:03:23 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public interface TldAttributeDescriptor extends XmlAttributeDescriptor {
/**
* Indicates that attribute is a fragment
+ *
* @return
*/
boolean isIndirectSyntax();
/**
* Returns method signature for deferred methods
+ *
* @return
*/
@Nullable
/**
* Returns value of "type" subtag
+ *
* @return
*/
@Nullable
import org.jetbrains.annotations.Nullable;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Sep 5, 2003
- * Time: 3:31:23 PM
- * To change this template use Options | File Templates.
+ * @author max
*/
public abstract class SmartEnterProcessor {
public abstract boolean process(@NotNull final Project project, @NotNull final Editor editor, @NotNull final PsiFile psiFile);
package com.intellij.diagnostic.logging;
/**
- * Created by IntelliJ IDEA.
- * User: Eugene.Kudelevsky
- * Date: Sep 11, 2009
- * Time: 2:34:25 PM
- * To change this template use File | Settings | File Templates.
+ * @author Eugene.Kudelevsky
*/
public abstract class IndependentLogFilter extends LogFilter {
protected IndependentLogFilter(String name) {
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Aug 29, 2005
- * Time: 11:45:48 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public class ExecutionBundle {
private static Reference<ResourceBundle> ourBundle;
import com.intellij.util.IncorrectOperationException;
/**
- * Created by IntelliJ IDEA.
- * User: ik
- * Date: Oct 6, 2004
- * Time: 9:48:15 PM
- * To change this template use File | Settings | File Templates.
+ * @author ik
*/
-public interface PomTransaction{
+public interface PomTransaction {
PomModelEvent getAccumulatedEvent();
+
void run() throws IncorrectOperationException;
+
PsiElement getChangeScope();
+
PomModelAspect getTransactionAspect();
}
import com.intellij.lang.ASTNode;
/**
- * Created by IntelliJ IDEA.
- * User: ik
- * Date: Oct 6, 2004
- * Time: 11:00:28 PM
- * To change this template use File | Settings | File Templates.
+ * @author ik
*/
-
public interface TreeChange {
void addChange(ASTNode child, ChangeInfo changeInfo);
ASTNode[] getAffectedChildren();
+
ChangeInfo getChangeByChild(ASTNode child);
+
int getChildOffsetInNewTree(ASTNode child);
void composite(TreeChange treeChange);
+
boolean isEmpty();
void removeChange(ASTNode beforeEqualDepth);
import com.intellij.pom.event.PomChangeSet;
/**
- * Created by IntelliJ IDEA.
- * User: ik
- * Date: Oct 6, 2004
- * Time: 10:56:52 PM
- * To change this template use File | Settings | File Templates.
+ * @author ik
*/
-public interface TreeChangeEvent extends PomChangeSet{
+public interface TreeChangeEvent extends PomChangeSet {
ASTNode getRootElement();
+
ASTNode[] getChangedElements();
+
TreeChange getChangesByElement(ASTNode element);
void addElementaryChange(ASTNode child, ChangeInfo change);
+
void clear();
}
import com.intellij.util.IncorrectOperationException;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Apr 18, 2005
- * Time: 2:41:47 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public interface PsiWritableMetaData extends PsiMetaData {
void setName(String name) throws IncorrectOperationException;
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 11.08.2005
- * Time: 16:04:31
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class UsageViewBundle {
private static Reference<ResourceBundle> ourBundle;
import com.intellij.openapi.util.Key;
/**
- * Created by IntelliJ IDEA.
- * User: ik
- * Date: 07.06.2004
- * Time: 15:28:03
- * To change this template use File | Settings | File Templates.
+ * @author ik
*/
-public interface CharTable{
+public interface CharTable {
int PAGE_SIZE = 256;
Key<CharTable> CHAR_TABLE_KEY = new Key<CharTable>("Char table");
package com.intellij.application.options.colors;
-import com.intellij.openapi.editor.colors.TextAttributesKey;
-import com.intellij.openapi.editor.colors.EditorColorsScheme;
import com.intellij.openapi.editor.colors.EditorColorsManager;
+import com.intellij.openapi.editor.colors.EditorColorsScheme;
+import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.editor.colors.impl.EditorColorsManagerImpl;
-import com.intellij.openapi.options.colors.ColorSettingsPage;
import com.intellij.openapi.options.colors.AttributesDescriptor;
+import com.intellij.openapi.options.colors.ColorSettingsPage;
import com.intellij.util.containers.HashMap;
import java.util.Map;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Oct 23, 2008
- * Time: 4:28:18 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public class ColorSettingsUtil {
+ private ColorSettingsUtil() {
+ }
+
public static Map<TextAttributesKey, String> keyToDisplayTextMap(final ColorSettingsPage page) {
final AttributesDescriptor[] attributeDescriptors = page.getAttributeDescriptors();
final Map<TextAttributesKey, String> displayText = new HashMap<TextAttributesKey, String>();
package com.intellij.application.options.editor;
-import com.intellij.openapi.options.ConfigurationException;
-import com.intellij.openapi.application.ApplicationBundle;
import com.intellij.ide.ui.UISettings;
+import com.intellij.openapi.application.ApplicationBundle;
+import com.intellij.openapi.options.ConfigurationException;
import org.jetbrains.annotations.Nls;
import javax.swing.*;
import java.awt.*;
-import java.awt.event.ItemListener;
import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
/**
* @author yole
}
public Icon getIcon() {
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ return null;
}
public String getHelpTopic() {
public boolean isModified() {
final UISettings uiSettings = UISettings.getInstance();
- boolean isModified = isModified(myCbModifiedTabsMarkedWithAsterisk, uiSettings.MARK_MODIFIED_TABS_WITH_ASTERISK);;
+ boolean isModified = isModified(myCbModifiedTabsMarkedWithAsterisk, uiSettings.MARK_MODIFIED_TABS_WITH_ASTERISK);
isModified |= isModified(myEditorTabLimitField, uiSettings.EDITOR_TAB_LIMIT);
int tabPlacement = ((Integer)myEditorTabPlacement.getSelectedItem()).intValue();
isModified |= tabPlacement != uiSettings.EDITOR_TAB_PLACEMENT;
}
public void disposeUIResources() {
- //To change body of implemented methods use File | Settings | File Templates.
}
if (UISettings.TABS_NONE == tabPlacement) {
text = ApplicationBundle.message("combobox.tab.placement.none");
}
- else if (SwingConstants.TOP == tabPlacement) {
+ else if (TOP == tabPlacement) {
text = ApplicationBundle.message("combobox.tab.placement.top");
}
- else if (SwingConstants.LEFT == tabPlacement) {
+ else if (LEFT == tabPlacement) {
text = ApplicationBundle.message("combobox.tab.placement.left");
}
- else if (SwingConstants.BOTTOM == tabPlacement) {
+ else if (BOTTOM == tabPlacement) {
text = ApplicationBundle.message("combobox.tab.placement.bottom");
}
- else if (SwingConstants.RIGHT == tabPlacement) {
+ else if (RIGHT == tabPlacement) {
text = ApplicationBundle.message("combobox.tab.placement.right");
}
else {
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 30.08.2005
- * Time: 18:49:13
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class CodeEditorBundle {
private static Reference<ResourceBundle> ourBundle;
import org.jetbrains.annotations.NonNls;
/**
- * Created by IntelliJ IDEA.
- * User: Alexander.Chernikov
- * Date: 20.10.2006
- * Time: 18:55:05
- * To change this template use File | Settings | File Templates.
+ * @author Alexander.Chernikov
*/
public interface HelpID {
@NonNls String EXPORT_TO_HTML = "reference.file.exportToHtml";
import java.util.*;
/**
- * Created by IntelliJ IDEA.
- * User: ik
- * Date: 31.01.2003
- * Time: 17:38:14
- * To change this template use Options | File Templates.
+ * @author ik
*/
-
public class CompletionVariant {
protected static final TailType DEFAULT_TAIL_TYPE = TailType.SPACE;
import com.intellij.psi.PsiElement;
/**
- * Created by IntelliJ IDEA.
- * User: ik
- * Date: 17.02.2003
- * Time: 16:53:09
- * To change this template use Options | File Templates.
+ * @author ik
*/
public interface KeywordChooser{
String[] getKeywords(CompletionContext context, PsiElement position);
import com.intellij.psi.filters.TrueFilter;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Oct 14, 2004
- * Time: 4:28:39 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class SyntaxTableCompletionData extends CompletionData{
private final SyntaxTable mySyntaxTable;
import java.util.*;
/**
- * Created by IntelliJ IDEA.
- * User: mike
- * Date: May 11, 2006
- * Time: 3:48:48 PM
- * To change this template use File | Settings | File Templates.
+ * @author mike
*/
public class HippieWordCompletionHandler implements CodeInsightActionHandler {
private static final Key<CompletionState> KEY_STATE = new Key<CompletionState>("HIPPIE_COMPLETION_STATE");
import org.jetbrains.annotations.NotNull;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Jan 14, 2005
- * Time: 10:53:20 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public interface Validator<T extends PsiElement> {
interface ValidationHost {
import org.jetbrains.annotations.NotNull;
/**
- * Created by IntelliJ IDEA.
- * User: ven
- * Date: Apr 10, 2003
- * Time: 8:52:53 PM
- * To change this template use Options | File Templates.
+ * @author ven
*/
public class CollapseSelectionHandler implements CodeInsightActionHandler {
private static final String ourPlaceHolderText = "...";
package com.intellij.codeInsight.folding.impl.actions;
-import com.intellij.codeInsight.actions.BaseCodeInsightAction;
import com.intellij.codeInsight.CodeInsightActionHandler;
+import com.intellij.codeInsight.actions.BaseCodeInsightAction;
import com.intellij.codeInsight.folding.impl.CollapseSelectionHandler;
import com.intellij.openapi.project.DumbAware;
/**
- * Created by IntelliJ IDEA.
- * User: ven
- * Date: Apr 10, 2003
- * Time: 9:59:35 PM
- * To change this template use Options | File Templates.
+ * @author ven
*/
public class CollapseSelectionAction extends BaseCodeInsightAction implements DumbAware {
protected CodeInsightActionHandler getHandler() {
import com.intellij.openapi.project.Project;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Sep 29, 2004
- * Time: 7:38:32 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
* @deprecated use InsertHandler
*/
public interface DeferredUserLookupValue<T> extends PresentableLookupValue {
- boolean handleUserSelection(LookupItem<T> item,Project project);
+ boolean handleUserSelection(LookupItem<T> item, Project project);
}
package com.intellij.codeInsight.lookup;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Jun 20, 2005
- * Time: 8:12:52 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public interface LookupValueWithPriority {
int NORMAL = 0;
int HIGHER = 1;
int HIGH = 2;
-
+
int getPriority();
}
import com.intellij.psi.PsiElement;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Jun 20, 2005
- * Time: 8:12:52 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public interface LookupValueWithPsiElement {
PsiElement getElement();
import java.awt.*;
/**
- * Created by IntelliJ IDEA.
- * User: maxim
- * Date: 10.12.2004
- * Time: 13:25:56
- * To change this template use File | Settings | File Templates.
+ * @author maxim
* @deprecated use InsertHandler
*/
public interface LookupValueWithUIHint extends PresentableLookupValue {
String getTypeHint();
+
Color getColorHint();
+
boolean isBold();
}
package com.intellij.codeInsight.lookup;
/**
- * Created by IntelliJ IDEA.
- * User: maxim
- * Date: 10.12.2004
- * Time: 13:38:25
- * To change this template use File | Settings | File Templates.
+ * @author maxim
* @deprecated use LookupElementBuilder
*/
public interface PresentableLookupValue {
- String getPresentation();
+ String getPresentation();
}
import com.intellij.openapi.fileTypes.LanguageFileType;
import com.intellij.openapi.fileTypes.SyntaxHighlighter;
import com.intellij.psi.PsiFile;
-import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Jul 28, 2008
- * Time: 4:53:26 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public abstract class FileTypeBasedContextType extends TemplateContextType {
private final LanguageFileType myFileType;
import java.util.Set;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Mar 19, 2004
- * Time: 1:28:54 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class TemplateImplUtil {
+ private TemplateImplUtil() {
+ }
+
public static boolean validateTemplateText(String s) {
TemplateTextLexer lexer = new TemplateTextLexer();
lexer.start(s);
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 31.08.2005
- * Time: 13:20:15
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class FindBundle {
private static Reference<ResourceBundle> ourBundle;
package com.intellij.find.findUsages;
+import com.intellij.openapi.help.HelpManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
-import com.intellij.openapi.help.HelpManager;
import com.intellij.psi.PsiElement;
import com.intellij.psi.search.LocalSearchScope;
import com.intellij.usageView.UsageViewUtil;
import javax.swing.*;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Feb 14, 2005
- * Time: 5:40:05 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public class CommonFindUsagesDialog extends AbstractFindUsagesDialog {
private final PsiElement myPsiElement;
import java.util.ArrayList;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Apr 14, 2005
- * Time: 9:40:01 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public abstract class AbstractBlockWrapper {
protected WhiteSpace myWhiteSpace;
import org.jetbrains.annotations.Nullable;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Dec 6, 2004
- * Time: 8:36:58 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
class CustomFileTypeBraceMatcher implements BraceMatcher {
public int getBraceTokenGroupId(IElementType tokenType) {
import com.intellij.psi.tree.IElementType;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Dec 6, 2004
- * Time: 8:34:21 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
class CustomFileTypeQuoteHandler implements QuoteHandler {
public boolean isClosingQuote(HighlighterIterator iterator, int offset) {
import com.intellij.psi.tree.IElementType;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Dec 6, 2004
- * Time: 7:40:12 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class BraceTokenParser extends PrefixedTokenParser {
public BraceTokenParser(String prefix, IElementType tokenType) {
import com.intellij.openapi.vfs.VirtualFile;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Feb 23, 2005
- * Time: 7:19:02 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public interface StructureViewWrapper {
boolean selectCurrentElement(FileEditor fileEditor, VirtualFile file, boolean requestFocus);
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 12.09.2005
- * Time: 18:03:21
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class LangBundle {
private static Reference<ResourceBundle> ourBundle;
import java.util.*;
/**
- * Created by IntelliJ IDEA.
- * User: ik
- * Date: Oct 6, 2004
- * Time: 11:11:40 PM
- * To change this template use File | Settings | File Templates.
+ * @author ik
*/
public class TreeChangeEventImpl implements TreeChangeEvent{
private final Map<ASTNode, TreeChange> myChangedElements = new THashMap<ASTNode, TreeChange>();
import org.jetbrains.annotations.Nullable;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Jul 21, 2005
- * Time: 7:53:12 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public class AbstractPostFormatProcessor {
protected final CodeStyleSettings mySettings;
+++ /dev/null
-/*
- * Copyright 2000-2009 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.intellij.psi.impl.source.codeStyle;
-
-import com.intellij.openapi.util.TextRange;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Nov 26, 2008
- * Time: 6:26:45 PM
- * To change this template use File | Settings | File Templates.
- */
-public class AffectedTextRange extends TextRange {
- private final boolean myProcessHeadingWhiteSpace;
-
- public AffectedTextRange(final int startOffset, final int endOffset, final boolean processHeadingWhiteSpace) {
- super(startOffset, endOffset);
- myProcessHeadingWhiteSpace = processHeadingWhiteSpace;
- }
-
- public AffectedTextRange(final TextRange affectedRange, final boolean processHeadingWhitespace) {
- this(affectedRange.getStartOffset(), affectedRange.getEndOffset(), processHeadingWhitespace);
- }
-
- public boolean isProcessHeadingWhiteSpace() {
- return myProcessHeadingWhiteSpace;
- }
-}
package com.intellij.psi.impl.source.parsing;
-import com.intellij.psi.impl.source.tree.TreeElement;
-import com.intellij.psi.tree.IElementType;
+import com.intellij.lang.ASTFactory;
import com.intellij.lexer.Lexer;
import com.intellij.lexer.LexerUtil;
+import com.intellij.psi.impl.source.tree.TreeElement;
+import com.intellij.psi.tree.IElementType;
import com.intellij.util.CharTable;
-import com.intellij.lang.ASTFactory;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: 20.04.2009
- * Time: 15:02:52
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class ParseUtilBase {
public static TreeElement createTokenElement(Lexer lexer, CharTable table) {
import java.util.Map;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Nov 9, 2005
- * Time: 8:10:06 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class CustomizingReferenceProvider extends PsiReferenceProvider implements CustomizableReferenceProvider {
private final CustomizableReferenceProvider myProvider;
- private @Nullable Map<CustomizableReferenceProvider.CustomizationKey, Object> myOptions;
+ private @Nullable Map<CustomizationKey, Object> myOptions;
public CustomizingReferenceProvider(@NotNull CustomizableReferenceProvider provider) {
myProvider = provider;
public <Option> void addCustomization(CustomizableReferenceProvider.CustomizationKey<Option> key, Option value) {
if (myOptions == null) {
- myOptions = new HashMap<CustomizableReferenceProvider.CustomizationKey, Object>(5);
+ myOptions = new HashMap<CustomizationKey, Object>(5);
}
myOptions.put(key,value);
}
return referencesByElement;
}
- public void setOptions(@Nullable Map<CustomizableReferenceProvider.CustomizationKey, Object> options) {
+ public void setOptions(@Nullable Map<CustomizationKey, Object> options) {
myOptions = options; // merge ?
}
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 02.09.2005
- * Time: 16:41:11
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class ToolsBundle {
private static Reference<ResourceBundle> ourBundle;
package com.intellij.ide;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Dec 20, 2004
- * Time: 10:55:14 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public interface AutoScrollToSourceOptionProvider {
boolean isAutoScrollMode();
+
void setAutoScrollMode(boolean state);
}
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 25.08.2005
- * Time: 19:03:38
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class IdeBundle {
private static Reference<ResourceBundle> ourBundle;
import com.intellij.openapi.project.DumbAware;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Dec 19, 2004
- * Time: 7:38:56 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public abstract class TreeCollapseAllActionBase extends AnAction implements DumbAware {
public void actionPerformed(AnActionEvent e) {
TreeExpander expander = getExpander(e.getDataContext());
- if (expander == null) return;
- if (!expander.canCollapse()) return;
+ if (expander == null) {
+ return;
+ }
+ if (!expander.canCollapse()) {
+ return;
+ }
expander.collapseAll();
}
import com.intellij.openapi.project.DumbAware;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Dec 19, 2004
- * Time: 7:41:17 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public abstract class TreeExpandAllActionBase extends AnAction implements DumbAware {
protected abstract TreeExpander getExpander(DataContext dataContext);
return loader;
}
catch (NoSuchMethodException e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ e.printStackTrace();
}
catch (IOException e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ e.printStackTrace();
}
catch (IllegalAccessException e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ e.printStackTrace();
}
catch (InvocationTargetException e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ e.printStackTrace();
}
}
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Aug 31, 2005
- * Time: 6:02:17 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public class DiffBundle {
private static Reference<ResourceBundle> ourBundle;
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Sep 2, 2005
- * Time: 5:11:42 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public class EditorBundle {
private static Reference<ResourceBundle> ourBundle;
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Sep 1, 2005
- * Time: 6:05:22 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public class OptionsBundle {
private static Reference<ResourceBundle> ourBundle;
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Aug 24, 2005
- * Time: 3:50:25 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public class VcsBundle {
private static Reference<ResourceBundle> ourBundle;
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 02.09.2005
- * Time: 17:46:54
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class VfsBundle {
private static Reference<ResourceBundle> ourBundle;
import javax.swing.*;
/**
- * Created by IntelliJ IDEA.
- * User: beg
- * Date: Oct 11, 2004
- * Time: 10:01:36 PM
- * To change this template use File | Settings | File Templates.
+ * @author beg
*/
public class ScrollPaneFactory {
+ private ScrollPaneFactory() {
+ }
+
public static JScrollPane2 createScrollPane() {
return new JScrollPane2();
}
import java.util.Map;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Feb 17, 2005
- * Time: 4:22:50 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
@SuppressWarnings({"HardCodedStringLiteral"})
public class UI {
private static final Map<String, Color> ourColors = new HashMap<String, Color>();
+ private UI() {
+ }
+
static {
ourColors.put("panel.border.color", new Color(102, 101, 84));
ourColors.put("panel.separator.color", new Color(180, 179, 169));
ourColors.put("link.pressed.foreground", new Color(240, 0, 0));
ourColors.put("link.visited.foreground", new Color(128, 0, 128));
- ourColors.put("bar.separator.foreground", UI.getColor("panel.separator.color"));
+ ourColors.put("bar.separator.foreground", getColor("panel.separator.color"));
ourColors.put("bar.selected.separator.foreground", new Color(232, 231, 228));
ourColors.put("bar.background", UIUtil.getPanelBackground());
ourColors.put("bar.hover.background", UIUtil.getTreeSelectionBackground());
- ourColors.put("bar.selected.background", UI.getColor("panel.custom.background"));
+ ourColors.put("bar.selected.background", getColor("panel.custom.background"));
ourColors.put("bar.hover.frame.foreground", UIUtil.getTreeSelectionBackground().darker());
ourColors.put("popup.selected.background", UIUtil.getTreeSelectionBackground());
ourColors.put("toolbar.background", UIUtil.getPanelBackgound());
ourColors.put("toolbar.hover.background", UIUtil.getTreeSelectionBackground());
- ourColors.put("toolbar.selected.background", UI.getColor("panel.custom.background"));
+ ourColors.put("toolbar.selected.background", getColor("panel.custom.background"));
ourColors.put("toolbar.hover.frame.foreground", UIUtil.getTreeSelectionBackground().darker());
ourColors.put("speedsearch.background", new Color(244, 249, 181));
try {
sleep(15000);
} catch (InterruptedException e1) {
- e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ e1.printStackTrace();
}
}
};
try {
sleeper.join();
} catch (InterruptedException e1) {
- e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ e1.printStackTrace();
}
}
});
public boolean isDisposed() {
return myAnimator.isDisposed();
}
-}
\ No newline at end of file
+}
import java.awt.*;
/**
- * Created by IntelliJ IDEA.
- * User: cdr
- * Date: Feb 21, 2005
- * Time: 7:14:29 PM
- * To change this template use File | Settings | File Templates.
+ * @author cdr
*/
public class DocumentFragmentTooltipRenderer implements TooltipRenderer {
private final DocumentFragment myDocumentFragment;
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 31.08.2005
- * Time: 18:13:15
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class DiagnosticBundle {
private static Reference<ResourceBundle> ourBundle;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.Presentation;
import com.intellij.openapi.extensions.PluginId;
+import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.IconLoader;
-import com.intellij.openapi.project.DumbAware;
import com.intellij.util.net.IOExceptionDialog;
import java.io.IOException;
import java.util.Arrays;
/**
- * Created by IntelliJ IDEA.
- * User: lloix
- * Date: May 24, 2006
- * Time: 2:47:54 PM
- * To change this template use File | Settings | File Templates.
+ * @author lloix
*/
public class ActionInstallPlugin extends AnAction implements DumbAware {
final private static String updateMessage = IdeBundle.message("action.update.plugin");
import com.intellij.openapi.util.IconLoader;
import java.io.IOException;
-import java.text.MessageFormat;
import java.util.ArrayList;
/**
- * Created by IntelliJ IDEA.
- * User: lloix
- * Date: May 24, 2006
- * Time: 3:19:45 PM
- * To change this template use File | Settings | File Templates.
+ * @author lloix
*/
public class ActionUninstallPlugin extends AnAction implements DumbAware {
final private static String promptTitle = IdeBundle.message("title.plugin.uninstall");
// not empty - issue warning instead of simple prompt.
ArrayList<IdeaPluginDescriptorImpl> dependant = host.getDependentList(pluginDescriptor);
if (dependant.size() > 0) {
- message = MessageFormat.format(IdeBundle.message("several.plugins.depend.on.0.continue.to.remove"), pluginDescriptor.getName());
+ message = IdeBundle.message("several.plugins.depend.on.0.continue.to.remove", pluginDescriptor.getName());
actualDelete = (Messages.showYesNoDialog(host.getMainPanel(), message, promptTitle, Messages.getQuestionIcon()) == 0);
}
import java.io.*;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Jan 4, 2005
- * Time: 10:06:20 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public class Launcher {
- @SuppressWarnings({"HardCodedStringLiteral"})
+ private Launcher() {
+ }
+
+ @SuppressWarnings({"HardCodedStringLiteral"})
public static void main(String[] args) throws InterruptedException {
String javaVmExecutablePath = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java";
String classpath = System.getProperty("java.class.path");
}
public boolean hasHeaderComponent() {
- return false; //To change body of implemented methods use File | Settings | File Templates.
+ return false;
}
@Nullable
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 31.08.2005
- * Time: 17:41:39
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class FileTypesBundle {
private static Reference<ResourceBundle> ourBundle;
import com.intellij.lang.Language;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Mar 15, 2006
- * Time: 7:42:03 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class PlainTextLanguage extends Language {
package com.intellij.openapi.progress.util;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 19, 2004
- * Time: 5:15:09 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public interface ProgressIndicatorListener {
- public void cancelled();
+ void cancelled();
- public void stopped();
+ void stopped();
}
package com.intellij.openapi.progress.util;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 19, 2004
- * Time: 5:23:48 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
-public class ProgressIndicatorListenerAdapter implements ProgressIndicatorListener{
- //should return whether to stop processing
+public class ProgressIndicatorListenerAdapter implements ProgressIndicatorListener {
+ /**
+ * should return whether to stop processing
+ */
public void cancelled() {
}
- //should return whether to stop processing
+ /**
+ * should return whether to stop processing
+ */
public void stopped() {
}
}
import com.intellij.openapi.project.Project;
import javax.swing.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
import java.util.LinkedList;
/**
- * Created by IntelliJ IDEA.
- * User: lex
- * Date: Apr 19, 2004
- * Time: 5:10:44 PM
- * To change this template use File | Settings | File Templates.
+ * @author lex
*/
public class ProgressWindowWithNotification extends ProgressWindow {
private final LinkedList<ProgressIndicatorListener> myListeners = new LinkedList<ProgressIndicatorListener>();
public void cancel() {
super.cancel();
- for (Iterator<ProgressIndicatorListener> iterator = myListeners.iterator(); iterator.hasNext();) {
- ProgressIndicatorListener progressIndicatorListener = iterator.next();
+ for (final ProgressIndicatorListener progressIndicatorListener : myListeners) {
progressIndicatorListener.cancelled();
}
}
public synchronized void stop() {
- for (Iterator<ProgressIndicatorListener> iterator = myListeners.iterator(); iterator.hasNext();) {
- ProgressIndicatorListener progressIndicatorListener = iterator.next();
+ for (final ProgressIndicatorListener progressIndicatorListener : myListeners) {
progressIndicatorListener.stopped();
}
super.stop();
import java.util.List;
/**
- * Created by IntelliJ IDEA.
- * User: pti
- * Date: Jun 24, 2005
- * Time: 10:44:40 PM
- * To change this template use File | Settings | File Templates.
+ * @author pti
*/
-
class NoUpdatesDialog extends AbstractUpdateDialog {
protected NoUpdatesDialog(final boolean canBeParent, final List<PluginDownloader> updatePlugins, boolean enableLink) {
import java.util.List;
/**
- * Created by IntelliJ IDEA.
- * User: pti
- * Date: Jun 10, 2005
- * Time: 12:39:08 PM
- * To change this template use File | Settings | File Templates.
+ * @author pti
*/
-
public class UpdateSettingsConfigurable extends BaseConfigurable implements SearchableConfigurable {
private UpdatesSettingsPanel myUpdatesSettingsPanel;
private boolean myCheckNowEnabled = true;
import java.util.List;
/**
- * Created by IntelliJ IDEA.
- * User: pti
- * Date: Mar 18, 2005
- * Time: 7:32:41 PM
- * To change this template use File | Settings | File Templates.
+ * @author pti
*/
public class WelcomeScreen {
private JPanel myWelcomePanel;
protected void paintBackground(Graphics g) {
Dimension dimension = getSize();
int state = getPopState();
- if (state != ActionButtonComponent.NORMAL) {
- if (state == ActionButtonComponent.POPPED) {
+ if (state != NORMAL) {
+ if (state == POPPED) {
g.setColor(BUTTON_POPPED_COLOR);
g.fillRect(0, 0, dimension.width, dimension.height);
}
g.setColor(getNormalButtonColor());
g.fillRect(0, 0, dimension.width, dimension.height);
}
- if (state == ActionButtonComponent.PUSHED) {
+ if (state == PUSHED) {
g.setColor(BUTTON_PUSHED_COLOR);
g.fillRect(0, 0, dimension.width, dimension.height);
}
}
public int getPopState() {
- if (myKeypressedButton == this) return ActionButtonComponent.PUSHED;
- if (myKeypressedButton != null) return ActionButtonComponent.NORMAL;
+ if (myKeypressedButton == this) return PUSHED;
+ if (myKeypressedButton != null) return NORMAL;
if (mySelectedColumn == myColumnIdx &&
mySelectedRow == myRowIdx &&
mySelectedGroup == myGroupIdx) {
- return ActionButtonComponent.POPPED;
+ return POPPED;
}
- return ActionButtonComponent.NORMAL;
+ return NORMAL;
}
private void setupListeners(final JPanel panel) {
import java.awt.*;
/**
- * Created by IntelliJ IDEA.
- * User: pti
- * Date: Mar 29, 2005
- * Time: 9:23:39 PM
- * To change this template use File | Settings | File Templates.
+ * @author pti
*/
public class WelcomeScrollablePanel extends JPanel implements Scrollable{
import java.io.IOException;
/**
- * Created by IntelliJ IDEA.
- * User: Dmitry.Shtukenberg
- * Date: Apr 28, 2004
- * Time: 4:36:27 PM
- * To change this template use File | Settings | File Templates.
+ * @author Dmitry.Shtukenberg
*/
public class WriteableTIntObjectMapAdapter <V> implements WriteableMap<V> {
private final TIntObjectHashMap<V> hashmap;
import java.util.Set;
/**
-* Created by IntelliJ IDEA.
-* User: cdr
-* Date: Oct 2, 2009
-* Time: 2:41:53 PM
-* To change this template use File | Settings | File Templates.
-*/
+ * @author cdr
+ */
public class FileTreeAccessFilter implements VirtualFileFilter {
protected final Set<VirtualFile> myAddedClasses = new THashSet<VirtualFile>();
return (fileType == StdFileTypes.JAVA || fileType == StdFileTypes.CLASS) && !file.getName().equals("package-info.java");
}
-
public void allowTreeAccessForFile(VirtualFile file) {
myAddedClasses.add(file);
}
import org.jetbrains.annotations.NotNull;
/**
-* Created by IntelliJ IDEA.
-* User: Maxim.Mossienko
-* Date: 01.10.2009
-* Time: 21:44:31
-* To change this template use File | Settings | File Templates.
-*/
+ * @author Maxim.Mossienko
+ */
public class MockCreateParameterInfoContext implements CreateParameterInfoContext {
private Object[] myItems;
private PsiElement myHighlightedElement;
import java.awt.*;
/**
-* Created by IntelliJ IDEA.
-* User: Maxim.Mossienko
-* Date: 01.10.2009
-* Time: 21:43:55
-* To change this template use File | Settings | File Templates.
-*/
+ * @author Maxim.Mossienko
+ */
public class MockParameterInfoUIContext<T extends PsiElement> implements ParameterInfoUIContext {
private boolean enabled;
private String text;
import com.intellij.usages.UsageView;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Dec 22, 2004
- * Time: 9:04:56 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public class IncludeUsageAction extends IncludeExcludeActionBase {
protected void process(Usage[] usages, UsageView usageView) {
*/
package com.intellij.usages.impl;
+import com.intellij.usageView.UsageViewBundle;
import com.intellij.usages.TextChunk;
import com.intellij.usages.UsageGroup;
import com.intellij.usages.UsageViewSettings;
-import com.intellij.usageView.UsageViewBundle;
import com.intellij.util.SystemProperties;
import javax.swing.*;
import java.util.TooManyListenersException;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Dec 22, 2004
- * Time: 4:51:52 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
class ExporterToTextFile implements com.intellij.ide.ExporterToTextFile {
private final UsageViewImpl myUsageView;
import javax.swing.*;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Dec 17, 2004
- * Time: 9:34:53 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public class UsageTypeGroupingRule implements UsageGroupingRule {
public UsageGroup groupUsage(Usage usage) {
import com.intellij.usages.Usage;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Dec 17, 2004
- * Time: 9:35:13 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public interface PsiElementUsage extends Usage {
PsiElement getElement();
+
boolean isNonCodeUsage();
}
import com.intellij.usages.Usage;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Dec 17, 2004
- * Time: 5:21:01 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public interface UsageInFile extends Usage {
VirtualFile getFile();
import com.intellij.openapi.vfs.VirtualFile;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Dec 22, 2004
- * Time: 4:51:02 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public interface UsageInFiles {
VirtualFile[] getFiles();
import com.intellij.usages.Usage;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Dec 26, 2004
- * Time: 9:22:35 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public interface UsageInLibrary extends Usage {
OrderEntry getLibraryEntry();
import com.intellij.usages.Usage;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Dec 16, 2004
- * Time: 5:33:37 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public interface UsageInModule extends Usage {
Module getModule();
import javax.swing.*;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Dec 16, 2004
- * Time: 5:44:32 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public class UsageNodeTreeBuilderTest extends TestCase {
protected void setUp() throws Exception {
assertEquals("[Even[1[0, 2], 2[12, 14], 3[102]], Odd[1[1, 3], 2[13, 15], 3[101, 103, 105]], 5[10003, 10001, 10002]]", groupNode.toString());
}
- private Usage createUsage(int index) {
+ private static Usage createUsage(int index) {
return new MockUsage(index);
}
- private GroupNode buildUsageTree(int[] indices, UsageGroupingRule[] rules) {
+ private static GroupNode buildUsageTree(int[] indices, UsageGroupingRule[] rules) {
Usage[] usages = new Usage[indices.length];
for (int i = 0; i < usages.length; i++) {
usages[i] = createUsage(indices[i]);
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 11.08.2005
- * Time: 18:06:12
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class CommonBundle {
@NonNls private static final String BUNDLE = "messages.CommonBundle";
}
public static String getLoadingTreeNodeText() {
- return CommonBundle.message("tree.node.loading");
+ return message("tree.node.loading");
}
public static String getOkButtonText(){
}
public static String getYesButtonText(){
- return CommonBundle.message("button.yes");
+ return message("button.yes");
}
public static String getNoButtonText(){
- return CommonBundle.message("button.no");
+ return message("button.no");
}
public static String getContinueButtonText(){
- return CommonBundle.message("button.continue");
+ return message("button.continue");
}
public static String getYesForAllButtonText() {
- return CommonBundle.message("button.yes.for.all");
+ return message("button.yes.for.all");
}
public static String getCloseButtonText() {
- return CommonBundle.message("button.close");
+ return message("button.close");
}
public static String getNoForAllButtonText() {
- return CommonBundle.message("button.no.for.all");
+ return message("button.no.for.all");
}
public static String getApplyButtonText() {
- return CommonBundle.message("button.apply");
+ return message("button.apply");
}
}
package com.intellij.openapi.util.text;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: May 5, 2008
- * Time: 10:28:06 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public class StringHash {
private static final long initialHash = 0xe12398c6d9ae3b8aL; // initial values
import com.intellij.openapi.diagnostic.Logger;
/**
- * Created by IntelliJ IDEA.
- * User: Dmitry.Shtukenberg
- * Date: Jun 8, 2004
- * Time: 4:31:32 PM
- * To change this template use File | Settings | File Templates.
+ * @author Dmitry.Shtukenberg
*/
public final class VariableWidthIntArray implements Cloneable {
private static final Logger LOG = Logger.getInstance("#com.intellij.util.containers.VariableWidthIntArray");
- private int intArray[] = null;
- private short shortArray[] = null;
- private byte byteArray[] = null;
+ private int[] intArray = null;
+ private short[] shortArray = null;
+ private byte[] byteArray = null;
private final int minValue;
private final int maxValue;
public Object clone() throws CloneNotSupportedException {
VariableWidthIntArray arr = (VariableWidthIntArray)super.clone();
- if( intArray != null ) { arr.intArray = (int[])intArray.clone(); }
- if( shortArray != null ) { arr.shortArray = (short[])shortArray.clone(); }
- if( byteArray != null ) { arr.byteArray = (byte[])byteArray.clone(); }
+ if( intArray != null ) { arr.intArray = intArray.clone(); }
+ if( shortArray != null ) { arr.shortArray = shortArray.clone(); }
+ if( byteArray != null ) { arr.byteArray = byteArray.clone(); }
return arr;
}
package com.intellij.util.text;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: Dec 16, 2006
- * Time: 7:31:01 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public interface CharSequenceBackedByArray extends CharSequence {
char[] getChars();
+
void getChars(char[] dst, int dstOffset);
}
package com.intellij.util.text;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Jan 6, 2005
- * Time: 11:32:22 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public class MergingCharSequence implements CharSequence {
private final CharSequence s1;
import com.intellij.openapi.util.Pair;
import javax.swing.*;
-import java.util.Map;
-import java.util.HashMap;
import java.awt.*;
+import java.util.HashMap;
+import java.util.Map;
/**
- * Created by IntelliJ IDEA.
- * User: yole
- * Date: 02.09.2005
- * Time: 19:53:02
- * To change this template use File | Settings | File Templates.
+ * @author yole
*/
public class MappingListCellRenderer extends DefaultListCellRenderer {
- private final Map<Object,String> myValueMap;
+ private final Map<Object, String> myValueMap;
public MappingListCellRenderer(final Map<Object, String> valueMap) {
myValueMap = valueMap;
public MappingListCellRenderer(final Pair<Object, String>... valuePairs) {
myValueMap = new HashMap<Object, String>();
- for(Pair<Object, String> valuePair: valuePairs) {
+ for (Pair<Object, String> valuePair : valuePairs) {
myValueMap.put(valuePair.getFirst(), valuePair.getSecond());
}
}
import junit.framework.TestCase;
/**
- * Created by IntelliJ IDEA.
- * User: lvo
- * Date: Oct 24, 2005
- * Time: 11:24:04 AM
- * To change this template use File | Settings | File Templates.
+ * @author lvo
*/
public class ObjectCacheTest extends TestCase {
public void testCacheFiniteness() {
final private static HashMap removedPairs = new HashMap();
- private class CacheDeletedPairsListener implements ObjectCache.DeletedPairsListener {
+ private static class CacheDeletedPairsListener implements ObjectCache.DeletedPairsListener {
public void objectRemoved(Object key, Object value) {
removedPairs.put(key, value);
}
@Nullable
public JComponent getFilterUI() {
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ return null;
}
public void setFilterBase(List<CommittedChangeList> changeLists) {
return changeLists;
}
};
-}
\ No newline at end of file
+}
import org.jetbrains.annotations.Nullable;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Jul 29, 2005
- * Time: 12:34:09 AM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public class MergeData {
public byte[] ORIGINAL;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vcs.AbstractVcs;
import com.intellij.openapi.vcs.ProjectLevelVcsManager;
-import com.intellij.openapi.vcs.impl.VcsBackgroundableActions;
import com.intellij.openapi.vcs.diff.DiffProvider;
import com.intellij.openapi.vcs.diff.RevisionSelector;
import com.intellij.openapi.vcs.history.VcsRevisionNumber;
+import com.intellij.openapi.vcs.impl.VcsBackgroundableActions;
import com.intellij.openapi.vfs.VirtualFile;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Sep 7, 2005
- * Time: 3:06:05 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public class SelectAndCompareWithSelectedRevisionAction extends AbstractVcsAction{
protected void actionPerformed(VcsContext vcsContext) {
final VirtualFile file = vcsContext.getSelectedFiles()[0];
final Project project = vcsContext.getProject();
final AbstractVcs vcs = ProjectLevelVcsManager.getInstance(project).getVcsFor(file);
+ if (vcs == null) {
+ return;
+ }
RevisionSelector selector = vcs.getRevisionSelector();
final DiffProvider diffProvider = vcs.getDiffProvider();
}
public void initComponent() {
- //To change body of implemented methods use File | Settings | File Templates.
}
public void disposeComponent() {
- //To change body of implemented methods use File | Settings | File Templates.
}
private void dispose() {
import org.jetbrains.annotations.NotNull;
/**
- * Created by IntelliJ IDEA.
- * User: Irina.Chernushina
- * Date: 28.05.2009
- * Time: 13:30:26
- * To change this template use File | Settings | File Templates.
+ * @author Irina.Chernushina
*/
public interface AllVcsesI {
void registerManually(@NotNull AbstractVcs vcs);
import javax.swing.*;
/**
-* Created by IntelliJ IDEA.
-* User: Maxim.Mossienko
-* Date: 13.04.2009
-* Time: 18:02:30
-* To change this template use File | Settings | File Templates.
+* @author Maxim.Mossienko
*/
public class PsiBackedSmartStepIntoVariant<T extends PsiNamedElement & NavigationItem> extends XSmartStepIntoVariant {
private final T myElement;
import java.util.Stack;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Jul 13, 2005
- * Time: 11:05:20 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
-
-
public class CvsConflictsParser {
private static final String RIGHT = "<<<<<<<";
private static final String LEFT = "=======";
import com.intellij.cvsSupport2.CvsUtil;
import com.intellij.cvsSupport2.util.CvsVfsUtil;
-import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.vcs.VcsException;
import com.intellij.openapi.vcs.merge.MergeData;
import com.intellij.openapi.vcs.merge.MergeProvider;
import java.io.IOException;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Jul 29, 2005
- * Time: 12:48:39 AM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public class CvsMergeProvider implements MergeProvider {
- private static final Logger LOG = Logger.getInstance("#com.intellij.cvsSupport2.actions.merge.CvsMergeProvider");
-
@NotNull
public MergeData loadRevisions(final VirtualFile file) throws VcsException {
return parseConflictsInFile(file).createData();
@NotNull
public MergeData createData() throws VcsException {
try {
- BufferedInputStream input = null;
+ BufferedInputStream input = new BufferedInputStream(new FileInputStream(CvsVfsUtil.getFileFor(file)));
try {
- input = new BufferedInputStream(new FileInputStream(CvsVfsUtil.getFileFor(file)));
final CvsConflictsParser parser = CvsConflictsParser.createOn(input);
final MergeData mergeData = new MergeData();
mergeData.ORIGINAL = parser.getCenterVersion().getBytes();
return mergeData;
}
finally {
- if (input != null) {
- input.close();
- }
+ input.close();
}
}
catch (IOException e) {
import org.jetbrains.annotations.NotNull;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Jul 14, 2005
- * Time: 5:53:07 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
-
interface MergeDataProvider {
@NotNull
MergeData createData() throws VcsException;
import java.util.ArrayList;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Jul 14, 2005
- * Time: 5:44:14 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
class MergeInfo implements MergeDataProvider{
private final boolean myUseLocal;
/**
* User: lesya
*/
-
public class SshPasswordDialog extends DialogWrapper{
private JPasswordField myPasswordField;
private JCheckBox myStoreCheckbox;
*/
package com.intellij.cvsSupport2.cvsBrowser;
-import com.intellij.openapi.util.IconLoader;
import com.intellij.CommonBundle;
+import com.intellij.openapi.util.IconLoader;
-import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.*;
+import javax.swing.tree.DefaultMutableTreeNode;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Jul 22, 2005
- * Time: 6:39:50 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
class LoadingNode extends DefaultMutableTreeNode {
private String myText = CommonBundle.getLoadingTreeNodeText();
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Sep 5, 2005
- * Time: 3:20:59 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public class JavaCvsSrcBundle {
private static Reference<ResourceBundle> ourBundle;
@NonNls protected static final String PATH_TO_BUNDLE = "org.netbeans.lib.cvsclient.JavaCvsSrcBundle";
+ private JavaCvsSrcBundle() {
+ }
+
public static String message(@PropertyKey(resourceBundle = PATH_TO_BUNDLE)String key, Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
import java.util.ResourceBundle;
/**
- * Created by IntelliJ IDEA.
- * User: lesya
- * Date: Sep 5, 2005
- * Time: 5:09:57 PM
- * To change this template use File | Settings | File Templates.
+ * @author lesya
*/
public class SmartCvsSrcBundle {
private static Reference<ResourceBundle> ourBundle;
}
public int getFormatVersion() {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
+ return 0;
}
public void writeChangeList(DataOutput stream, CommittedChangeList list) throws IOException {
- //To change body of implemented methods use File | Settings | File Templates.
}
public CommittedChangeList readChangeList(RepositoryLocation location, DataInput stream) throws IOException {
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ return null;
}
public boolean isMaxCountSupported() {
- return false; //To change body of implemented methods use File | Settings | File Templates.
+ return false;
}
public Collection<FilePath> getIncomingFiles(RepositoryLocation location) throws VcsException {
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ return null;
}
public boolean refreshCacheByNumber() {
- return false; //To change body of implemented methods use File | Settings | File Templates.
+ return false;
}
@Nls
public String getChangelistTitle() {
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ return null;
}
public boolean isChangeLocallyAvailable(FilePath filePath,
@Nullable VcsRevisionNumber localRevision,
VcsRevisionNumber changeRevision,
CommittedChangeList changeList) {
- return false; //To change body of implemented methods use File | Settings | File Templates.
+ return false;
}
public boolean refreshIncomingWithCommitted() {
- return false; //To change body of implemented methods use File | Settings | File Templates.
+ return false;
}
}
import com.intellij.psi.PsiPackage;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
-import static org.jetbrains.plugins.groovy.annotator.GroovyAnnotator.isDeclarationAssignment;
import org.jetbrains.plugins.groovy.codeInspection.BaseInspection;
import org.jetbrains.plugins.groovy.codeInspection.BaseInspectionVisitor;
import org.jetbrains.plugins.groovy.lang.psi.api.GroovyResolveResult;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrExpression;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrReferenceExpression;
+import static org.jetbrains.plugins.groovy.annotator.GroovyAnnotator.isDeclarationAssignment;
+
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Medvedev
- * Date: Mar 10, 2009
- * Time: 5:04:31 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Medvedev
*/
public class GroovyUnresolvedAccessInspection extends BaseInspection {
protected BaseInspectionVisitor buildVisitor() {
import com.intellij.psi.PsiType;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
-import static org.jetbrains.plugins.groovy.annotator.GroovyAnnotator.isDeclarationAssignment;
import org.jetbrains.plugins.groovy.codeInspection.BaseInspection;
import org.jetbrains.plugins.groovy.codeInspection.BaseInspectionVisitor;
import org.jetbrains.plugins.groovy.lang.psi.api.GroovyResolveResult;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrExpression;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrReferenceExpression;
+import static org.jetbrains.plugins.groovy.annotator.GroovyAnnotator.isDeclarationAssignment;
+
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Medvedev
- * Date: Mar 10, 2009
- * Time: 4:19:06 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Medvedev
*/
public class GroovyUntypedAccessInspection extends BaseInspection {
import com.intellij.psi.PsiElement;
/**
- * User: Dmitry.Krasilschikov
+ * @author Dmitry.Krasilschikov
* Date: 29.07.2008
*/
public class GroovyCommentBreakerEnterProcessor implements EnterProcessor {
public boolean doEnter(Editor editor, PsiElement psiElement, boolean isModified) {
- return false; //To change body of implemented methods use File | Settings | File Templates.
+ return false;
}
}
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrExpression;
/**
- * Created by IntelliJ IDEA.
- * User: Dmitry.Krasilschikov
- * Date: 16.02.2009
- * Time: 17:26:49
- * To change this template use File | Settings | File Templates.
+ * @author Dmitry.Krasilschikov
*/
public interface GrTupleDeclaration extends GroovyPsiElement{
@NotNull
import java.util.Arrays;
/**
- * Created by IntelliJ IDEA.
- * User: Dmitry.Krasilschikov
- * Date: 16.02.2009
- * Time: 17:23:45
- * To change this template use File | Settings | File Templates.
+ * @author Dmitry.Krasilschikov
*/
public class GrTupleDeclarationImpl extends GroovyPsiElementImpl implements GrTupleDeclaration {
public GrTupleDeclarationImpl(@NotNull ASTNode node) {
import com.intellij.psi.scope.PsiScopeProcessor;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Medvedev
- * Date: Apr 1, 2009
- * Time: 7:20:45 PM
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Medvedev
*/
public interface NonCodeMembersProcessor {
ExtensionPointName<NonCodeMembersProcessor> EP_NAME = ExtensionPointName.create("org.intellij.groovy.nonCodeProcessor");
import org.jetbrains.plugins.groovy.structure.elements.impl.GroovyMethodStructureViewElement;
/**
- * Created by IntelliJ IDEA.
- * User: Dmitry.Krasilschikov
- * Date: 06.01.2009
- * Time: 15:02:27
- * To change this template use File | Settings | File Templates.
+ * @author Dmitry.Krasilschikov
*/
public class GroovyInheritFilter extends InheritedMembersFilter {
@Override
import com.intellij.lang.properties.UnusedMessageFormatParameterInspection;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: 11.02.2009
- * Time: 17:54:45
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class JavaInspectionToolProvider implements InspectionToolProvider {
public Class[] getInspectionClasses() {
import java.util.List;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: 06.02.2009
- * Time: 21:13:07
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class JavaCreatePropertyFix extends CreatePropertyFix {
public JavaCreatePropertyFix() {}
import org.jetbrains.annotations.NotNull;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: 11.02.2009
- * Time: 13:56:00
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
public class PropertiesFileTypeFactory extends FileTypeFactory {
public void createFileTypes(@NotNull FileTypeConsumer consumer) {
import com.intellij.codeInspection.duplicatePropertyInspection.DuplicatePropertyInspection;
/**
- * Created by IntelliJ IDEA.
- * User: Maxim.Mossienko
- * Date: 11.02.2009
- * Time: 18:23:29
- * To change this template use File | Settings | File Templates.
+ * @author Maxim.Mossienko
*/
-public class PropertiesInspectionToolsProvider implements InspectionToolProvider{
+public class PropertiesInspectionToolsProvider implements InspectionToolProvider {
public Class[] getInspectionClasses() {
- return new Class[] {
- UnusedPropertyInspection.class, DuplicatePropertyInspection.class
- };
+ return new Class[]{UnusedPropertyInspection.class, DuplicatePropertyInspection.class};
}
}
import com.intellij.ide.structureView.StructureViewModel;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Feb 10, 2005
- * Time: 3:13:23 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public interface PropertiesGroupingStructureViewModel extends StructureViewModel {
void setSeparator(String separator);
import org.jetbrains.annotations.NotNull;
/**
- * Created by IntelliJ IDEA.
- * User: max
- * Date: Feb 10, 2005
- * Time: 3:13:23 PM
- * To change this template use File | Settings | File Templates.
+ * @author max
*/
public class ResourceBundleStructureViewModel implements PropertiesGroupingStructureViewModel {
private final Project myProject;