Merge remote-tracking branch 'origin/master'
|
After Width: | Height: | Size: 289 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 204 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
@@ -35,7 +35,7 @@ public class AddArrangementSectionRuleAction extends AddArrangementRuleAction {
|
||||
|
||||
@Override
|
||||
public void update(AnActionEvent e) {
|
||||
e.getPresentation().setIcon(SystemInfoRt.isMac ? AllIcons.ToolbarDecorator.Mac.Add : AllIcons.ToolbarDecorator.Add);
|
||||
e.getPresentation().setIcon(SystemInfoRt.isMac ? AllIcons.CodeStyle.Mac.AddNewSectionRule : AllIcons.CodeStyle.AddNewSectionRule);
|
||||
final ArrangementMatchingRulesControl control = ArrangementMatchingRulesControl.KEY.getData(e.getDataContext());
|
||||
if (control == null) {
|
||||
return;
|
||||
|
||||
@@ -163,6 +163,14 @@ public class AllIcons {
|
||||
|
||||
}
|
||||
|
||||
public static class CodeStyle {
|
||||
public static final Icon AddNewSectionRule = IconLoader.getIcon("/codeStyle/AddNewSectionRule.png"); // 16x16
|
||||
|
||||
public static class Mac {
|
||||
public static final Icon AddNewSectionRule = IconLoader.getIcon("/codeStyle/mac/AddNewSectionRule.png"); // 16x16
|
||||
}
|
||||
}
|
||||
|
||||
public static class Css {
|
||||
public static final Icon Atrule = IconLoader.getIcon("/css/atrule.png"); // 16x16
|
||||
public static final Icon Import = IconLoader.getIcon("/css/import.png"); // 16x16
|
||||
|
||||
@@ -44,15 +44,17 @@ import java.util.List;
|
||||
* @author yole
|
||||
*/
|
||||
public class RepositoryChangesBrowser extends ChangesBrowser implements DataProvider {
|
||||
|
||||
private CommittedChangesBrowserUseCase myUseCase;
|
||||
private EditSourceAction myEditSourceAction;
|
||||
|
||||
public RepositoryChangesBrowser(final Project project, final List<CommittedChangeList> changeLists) {
|
||||
super(project, changeLists, Collections.<Change>emptyList(), null, false, false, null, MyUseCase.COMMITTED_CHANGES, null);
|
||||
this(project, changeLists, Collections.<Change>emptyList(), null);
|
||||
}
|
||||
|
||||
public RepositoryChangesBrowser(final Project project, final List<? extends ChangeList> changeLists, final List<Change> changes,
|
||||
final ChangeList initialListSelection) {
|
||||
super(project, changeLists, changes, initialListSelection, false, false, null, MyUseCase.COMMITTED_CHANGES, null);
|
||||
this(project, changeLists, changes, initialListSelection, null);
|
||||
}
|
||||
|
||||
public RepositoryChangesBrowser(final Project project, final List<? extends ChangeList> changeLists, final List<Change> changes,
|
||||
@@ -64,9 +66,9 @@ public class RepositoryChangesBrowser extends ChangesBrowser implements DataProv
|
||||
super.buildToolBar(toolBarGroup);
|
||||
|
||||
toolBarGroup.add(new ShowDiffWithLocalAction());
|
||||
final MyEditSourceAction editSourceAction = new MyEditSourceAction();
|
||||
editSourceAction.registerCustomShortcutSet(CommonShortcuts.getEditSource(), this);
|
||||
toolBarGroup.add(editSourceAction);
|
||||
myEditSourceAction = new MyEditSourceAction();
|
||||
myEditSourceAction.registerCustomShortcutSet(CommonShortcuts.getEditSource(), this);
|
||||
toolBarGroup.add(myEditSourceAction);
|
||||
OpenRepositoryVersionAction action = new OpenRepositoryVersionAction();
|
||||
toolBarGroup.add(action);
|
||||
final RevertSelectedChangesAction revertSelectedChangesAction = new RevertSelectedChangesAction();
|
||||
@@ -100,6 +102,10 @@ public class RepositoryChangesBrowser extends ChangesBrowser implements DataProv
|
||||
}
|
||||
}
|
||||
|
||||
public EditSourceAction getEditSourceAction() {
|
||||
return myEditSourceAction;
|
||||
}
|
||||
|
||||
private class MyEditSourceAction extends EditSourceAction {
|
||||
private final Icon myEditSourceIcon;
|
||||
|
||||
|
||||
@@ -70,8 +70,9 @@ public class MainFrame extends JPanel implements TypeSafeDataProvider {
|
||||
myBranchesPanel.setVisible(settings.isShowBranchesPanel());
|
||||
myDetailsPanel = new DetailsPanel(logDataHolder, myGraphTable, vcsLogUI.getColorManager(), initialDataPack);
|
||||
|
||||
final ChangesBrowser changesBrowser = new RepositoryChangesBrowser(project, null, Collections.<Change>emptyList(), null);
|
||||
final RepositoryChangesBrowser changesBrowser = new RepositoryChangesBrowser(project, null, Collections.<Change>emptyList(), null);
|
||||
changesBrowser.getDiffAction().registerCustomShortcutSet(CommonShortcuts.getDiff(), getGraphTable());
|
||||
changesBrowser.getEditSourceAction().registerCustomShortcutSet(CommonShortcuts.getEditSource(), getGraphTable());
|
||||
setDefaultEmptyText(changesBrowser);
|
||||
myChangesLoadingPane = new JBLoadingPanel(new BorderLayout(), project);
|
||||
myChangesLoadingPane.add(changesBrowser);
|
||||
@@ -230,10 +231,10 @@ public class MainFrame extends JPanel implements TypeSafeDataProvider {
|
||||
else if (VcsLogDataKeys.VCS_LOG_DATA_PROVIDER == key) {
|
||||
sink.put(key, myLogDataHolder);
|
||||
}
|
||||
else if (VcsDataKeys.CHANGES.equals(key)) {
|
||||
else if (VcsDataKeys.CHANGES == key || VcsDataKeys.SELECTED_CHANGES == key) {
|
||||
List<Change> selectedChanges = getSelectedChanges();
|
||||
if (selectedChanges != null) {
|
||||
sink.put(VcsDataKeys.CHANGES, ArrayUtil.toObjectArray(selectedChanges, Change.class));
|
||||
sink.put(key, ArrayUtil.toObjectArray(selectedChanges, Change.class));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||