Merge remote-tracking branch 'origin/master'

This commit is contained in:
Maxim.Mossienko
2012-10-23 11:40:54 +02:00
5 changed files with 18 additions and 13 deletions
@@ -186,13 +186,16 @@ public abstract class MouseDragHelper implements MouseListener, MouseMotionListe
}
}
boolean needConsume = true;
if (myDetachingMode) {
processDragOut(e, draggedTo, (Point)myPressPointScreen.clone(), dragOutStarted);
} else {
processDrag(e, draggedTo, (Point)myPressPointScreen.clone());
needConsume = processDrag(e, draggedTo, (Point)myPressPointScreen.clone());
}
e.consume();
if (needConsume) {
e.consume();
}
}
}
@@ -229,7 +232,7 @@ public abstract class MouseDragHelper implements MouseListener, MouseMotionListe
return myDragJustStarted;
}
protected abstract void processDrag(MouseEvent event, Point dragToScreenPoint, Point startScreenPoint);
protected abstract boolean processDrag(MouseEvent event, Point dragToScreenPoint, Point startScreenPoint);
protected boolean isDragOut(MouseEvent event, Point dragToScreenPoint, Point startScreenPoint) {
return false;
@@ -92,13 +92,13 @@ class DragHelper extends MouseDragHelper {
myPressedTabLabel = findLabel(new RelativePoint(event).getPoint(myTabs));
}
protected void processDrag(MouseEvent event, Point targetScreenPoint, Point startPointScreen) {
if (!myTabs.isTabDraggingEnabled() || !isDragSource(event)) return;
protected boolean processDrag(MouseEvent event, Point targetScreenPoint, Point startPointScreen) {
if (!myTabs.isTabDraggingEnabled() || !isDragSource(event)) return false;
SwingUtilities.convertPointFromScreen(startPointScreen, myTabs);
if (isDragJustStarted()) {
if (myPressedTabLabel == null) return;
if (myPressedTabLabel == null) return false;
final Rectangle labelBounds = myPressedTabLabel.getBounds();
@@ -111,7 +111,7 @@ class DragHelper extends MouseDragHelper {
myDragOriginalRec.y -= myHoldDelta.height;
}
else {
if (myDragRec == null) return;
if (myDragRec == null) return false;
final Point toPoint = SwingUtilities.convertPoint(event.getComponent(), event.getPoint(), myTabs);
@@ -163,6 +163,7 @@ class DragHelper extends MouseDragHelper {
headerRec.height += border * 2;
myTabs.repaint(headerRec);
}
return true;
}
private boolean isDragSource(MouseEvent event) {
@@ -23,8 +23,6 @@ import com.intellij.openapi.components.impl.stores.StorageData;
import com.intellij.openapi.module.ModuleManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ProjectRootManager;
import com.intellij.openapi.roots.impl.DirectoryIndex;
import com.intellij.openapi.roots.impl.DirectoryIndexImpl;
import com.intellij.openapi.roots.impl.ProjectRootManagerImpl;
import com.intellij.openapi.roots.impl.libraries.LibraryTableBase;
import com.intellij.openapi.roots.impl.libraries.ProjectLibraryTable;
@@ -85,7 +83,6 @@ public class CoreProjectLoader {
moduleManager.loadModules();
project.projectOpened();
((DirectoryIndexImpl) DirectoryIndex.getInstance(project)).initialize();
}
public static StorageData loadStorageFile(ComponentManager componentManager, VirtualFile modulesXml) throws JDOMException, IOException {
@@ -162,7 +162,11 @@ abstract class HgRevisionsCommand {
Iterator<String> keys = copies.keySet().iterator();
while (keys.hasNext()) {
String s = keys.next();
if (!filesDeleted.contains(s)) {
if (filesAdded.contains(copies.get(s)) && filesDeleted.contains(s)) {
filesAdded.remove(copies.get(s));
filesDeleted.remove(s);
}
else if (!filesDeleted.contains(s)) {
keys.remove();
}
}
@@ -190,7 +190,7 @@ public class HgCachingCommitedChangesProvider implements CachingCommittedChanges
HgLogCommand hgLogCommand = new HgLogCommand(project);
hgLogCommand.setLogFile(false);
List<HgFileRevision> localRevisions =
hgLogCommand.execute(hgFile, maxCount == 0 ? -1 : maxCount, true, Collections.singletonList("--debug")); //can be empty
hgLogCommand.execute(hgFile, maxCount == 0 ? -1 : maxCount, true); //can be empty
Collections.reverse(localRevisions);
@@ -285,7 +285,7 @@ public class HgCachingCommitedChangesProvider implements CachingCommittedChanges
HgLogCommand hgLogCommand = new HgLogCommand(project);
hgLogCommand.setLogFile(false);
List<String> args = new ArrayList<String>();
args.add("--debug");
args.add("--follow");
args.add("--rev");
args.add(revision);
HgFileRevision localRevision = hgLogCommand.execute(hgFile, 1, true, args).get(0);