mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
override, fix public accessibility
This commit is contained in:
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history;
|
||||
|
||||
@@ -27,6 +13,7 @@ public interface Label {
|
||||
public void revert(@NotNull Project project, @NotNull VirtualFile file) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByteContent getByteContent(String path) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,10 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history;
|
||||
|
||||
public interface LocalHistoryAction {
|
||||
LocalHistoryAction NULL = new LocalHistoryAction() {
|
||||
@Override
|
||||
public void finish() {
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.core;
|
||||
|
||||
@@ -22,7 +8,6 @@ import com.intellij.history.core.changes.ChangeVisitor;
|
||||
import com.intellij.history.utils.LocalHistoryLog;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.util.Clock;
|
||||
import com.intellij.util.Consumer;
|
||||
import gnu.trove.TIntHashSet;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
|
||||
@@ -115,6 +100,7 @@ public class ChangeList {
|
||||
// todo synchronization issue: changeset may me modified while being iterated
|
||||
public synchronized Iterable<ChangeSet> iterChanges() {
|
||||
return new Iterable<ChangeSet>() {
|
||||
@Override
|
||||
public Iterator<ChangeSet> iterator() {
|
||||
return new Iterator<ChangeSet>() {
|
||||
private final TIntHashSet recursionGuard = new TIntHashSet(1000);
|
||||
@@ -122,10 +108,12 @@ public class ChangeList {
|
||||
private ChangeSetHolder currentBlock;
|
||||
private ChangeSet next = fetchNext();
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return next != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChangeSet next() {
|
||||
ChangeSet result = next;
|
||||
next = fetchNext();
|
||||
@@ -152,6 +140,7 @@ public class ChangeList {
|
||||
return currentBlock.changeSet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.core.changes;
|
||||
|
||||
@@ -44,6 +30,7 @@ public class MoveChange extends StructuralChange {
|
||||
StreamUtil.writeString(out, myOldPath);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOldPath() {
|
||||
return myOldPath;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.core.changes;
|
||||
|
||||
@@ -75,10 +61,12 @@ public class PutLabelChange extends Change {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCreationalFor(String path) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Content> getContentsToPurge() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.core.revisions;
|
||||
|
||||
@@ -77,6 +63,7 @@ public class Difference {
|
||||
if (e == null) return null;
|
||||
|
||||
return new ByteBackedContentRevision() {
|
||||
@Override
|
||||
@Nullable
|
||||
public String getContent() throws VcsException {
|
||||
if (e.isDirectory()) return null;
|
||||
@@ -90,11 +77,13 @@ public class Difference {
|
||||
return e.getContent().getBytes();
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public FilePath getFile() {
|
||||
return VcsUtil.getFilePath(new File(e.getPath()), e.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public VcsRevisionNumber getRevisionNumber() {
|
||||
return VcsRevisionNumber.NULL;
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.core.tree;
|
||||
|
||||
@@ -79,6 +65,7 @@ public class DirectoryEntry extends Entry {
|
||||
unsafeAddChild(child);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addChildren(Collection<Entry> children) {
|
||||
myChildren.ensureCapacity(myChildren.size() + children.size());
|
||||
for (Entry each : children) {
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2014 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.history.integration;
|
||||
|
||||
import com.intellij.history.core.LocalHistoryFacade;
|
||||
@@ -116,6 +102,7 @@ public class IdeaGateway {
|
||||
ourCurrentEventDispatchContext.set(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
ourCurrentEventDispatchContext.set(myPreviousContext);
|
||||
if (myPreviousContext != null && myPreviousContext.myFilterData == null && myFilterData != null) {
|
||||
|
||||
+2
-15
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.integration;
|
||||
|
||||
@@ -31,6 +17,7 @@ public class LocalHistoryActionImpl implements LocalHistoryAction {
|
||||
myDispatcher.startAction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish() {
|
||||
myDispatcher.finishAction(myName);
|
||||
}
|
||||
|
||||
+3
-15
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.integration.revertion;
|
||||
|
||||
@@ -66,8 +52,10 @@ public class SelectionReverter extends Reverter {
|
||||
return Collections.singletonList(file);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doRevert() throws IOException, FilesTooBigForDiffException {
|
||||
Block b = myCalculator.getSelectionFor(myLeftRevision, new Progress() {
|
||||
@Override
|
||||
public void processed(int percentage) {
|
||||
// should be already processed.
|
||||
}
|
||||
|
||||
+2
-15
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.integration.revertion;
|
||||
|
||||
@@ -268,6 +254,7 @@ public class UndoChangeRevertingVisitor extends ChangeVisitor {
|
||||
this.isReadOnly = isReadOnly;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() throws IOException {
|
||||
ReadOnlyAttributeUtil.setReadOnlyAttribute(myFile, isReadOnly);
|
||||
}
|
||||
|
||||
+2
-15
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.integration.ui.actions;
|
||||
|
||||
@@ -28,6 +14,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class LocalHistoryGroup extends NonTrivialActionGroup implements DumbAware {
|
||||
|
||||
@Override
|
||||
public void update(@NotNull AnActionEvent e) {
|
||||
Project project = e.getProject();
|
||||
VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE);
|
||||
|
||||
+2
-15
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.integration.ui.models;
|
||||
|
||||
@@ -26,6 +12,7 @@ public class EntireFileHistoryDialogModel extends FileHistoryDialogModel {
|
||||
super(p, gw, vcs, f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileDifferenceModel getDifferenceModel() {
|
||||
return new EntireFileDifferenceModel(myProject, myGateway, getLeftEntry(), getRightEntry(), isCurrentRevisionSelected());
|
||||
}
|
||||
|
||||
+9
-15
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2016 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.integration.ui.views;
|
||||
|
||||
@@ -117,6 +103,7 @@ public abstract class HistoryDialog<T extends HistoryDialogModel> extends FrameW
|
||||
myUpdateQueue.setRestartTimerOnAdd(true);
|
||||
|
||||
facade.addListener(new LocalHistoryFacade.Listener() {
|
||||
@Override
|
||||
public void changeSetFinished() {
|
||||
scheduleRevisionsUpdate(null);
|
||||
}
|
||||
@@ -190,6 +177,7 @@ public abstract class HistoryDialog<T extends HistoryDialogModel> extends FrameW
|
||||
|
||||
myToolBar = createRevisionsToolbar(actions);
|
||||
myRevisionsList = new RevisionsList(new RevisionsList.SelectionListener() {
|
||||
@Override
|
||||
public void revisionsSelected(final int first, final int last) {
|
||||
scheduleDiffUpdate(Couple.of(first, last));
|
||||
}
|
||||
@@ -227,6 +215,7 @@ public abstract class HistoryDialog<T extends HistoryDialogModel> extends FrameW
|
||||
|
||||
private void addPopupMenuToComponent(JComponent comp, final ActionGroup ag) {
|
||||
comp.addMouseListener(new PopupHandler() {
|
||||
@Override
|
||||
public void invokePopup(Component c, int x, int y) {
|
||||
ActionPopupMenu m = createPopupMenu(ag);
|
||||
m.getComponent().show(c, x, y);
|
||||
@@ -260,6 +249,7 @@ public abstract class HistoryDialog<T extends HistoryDialogModel> extends FrameW
|
||||
return getPriority() >= update1.getPriority();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (isDisposed() || myProject.isDisposed()) return;
|
||||
|
||||
@@ -325,6 +315,7 @@ public abstract class HistoryDialog<T extends HistoryDialogModel> extends FrameW
|
||||
final Ref<ContentDiffRequest> requestRef = new Ref<>();
|
||||
|
||||
new Task.Modal(myProject, message("message.processing.revisions"), false) {
|
||||
@Override
|
||||
public void run(@NotNull final ProgressIndicator i) {
|
||||
i.setIndeterminate(false);
|
||||
ApplicationManager.getApplication().runReadAction(() -> {
|
||||
@@ -555,14 +546,17 @@ public abstract class HistoryDialog<T extends HistoryDialogModel> extends FrameW
|
||||
myIndicator = i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processingLeftRevision() {
|
||||
myIndicator.setText(message("message.processing.left.revision"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processingRightRevision() {
|
||||
myIndicator.setText(message("message.processing.right.revision"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processed(int percentage) {
|
||||
myIndicator.setFraction(percentage / 100.0);
|
||||
}
|
||||
|
||||
+2
-16
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.integration.ui.views;
|
||||
|
||||
@@ -26,7 +12,6 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.Border;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
@@ -64,6 +49,7 @@ public class RecentChangeDialog extends DirectoryHistoryDialog {
|
||||
|
||||
private JPanel createButtonsPanel() {
|
||||
AbstractAction revert = new AbstractAction() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
revert();
|
||||
close();
|
||||
|
||||
+2
-15
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.integration.ui.views;
|
||||
|
||||
@@ -65,6 +51,7 @@ public class RecentChangesPopup {
|
||||
mySpacePanel.setPreferredSize(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getListCellRendererComponent(JList l, Object val, int i, boolean isSelected, boolean cellHasFocus) {
|
||||
RecentChange c = (RecentChange)val;
|
||||
myActionLabel.setText(c.getChangeName());
|
||||
|
||||
+7
-16
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2013 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.integration.ui.views;
|
||||
|
||||
@@ -47,8 +33,8 @@ import javax.swing.table.AbstractTableModel;
|
||||
import javax.swing.table.DefaultTableCellRenderer;
|
||||
import javax.swing.table.TableCellRenderer;
|
||||
import java.awt.*;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
public class RevisionsList {
|
||||
public static final int RECENT_PERIOD = 12;
|
||||
@@ -84,6 +70,7 @@ public class RevisionsList {
|
||||
private int mySelectedRow2 = 0;
|
||||
private final SelectionListener mySelectionListener = l;
|
||||
|
||||
@Override
|
||||
public void valueChanged(ListSelectionEvent e) {
|
||||
if (e.getValueIsAdjusting()) return;
|
||||
|
||||
@@ -165,14 +152,17 @@ public class RevisionsList {
|
||||
myPeriods = periods;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColumnCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRowCount() {
|
||||
return myRevisions.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RevisionItem getValueAt(int rowIndex, int columnIndex) {
|
||||
return myRevisions.get(rowIndex);
|
||||
}
|
||||
@@ -290,6 +280,7 @@ public class RevisionsList {
|
||||
myTitleLabel.setComponentStyle(UIUtil.ComponentStyle.REGULAR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
if (value == null) return myWrapperPanel; // null erroneously comes from JPanel.getAccessibleChild
|
||||
|
||||
|
||||
@@ -1,22 +1,9 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.history.utils;
|
||||
|
||||
public abstract class RunnableAdapter implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
doRun();
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.openapi.command.impl;
|
||||
|
||||
@@ -47,6 +33,7 @@ public class ChangeRange {
|
||||
final Ref<Long> first = new Ref<>();
|
||||
final Ref<Long> last = new Ref<>();
|
||||
LocalHistoryFacade.Listener l = new LocalHistoryFacade.Listener() {
|
||||
@Override
|
||||
public void changeAdded(Change c) {
|
||||
if (first.isNull()) first.set(c.getId());
|
||||
last.set(c.getId());
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ import com.intellij.util.messages.MessageBusConnection;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
class DocumentUndoProvider {
|
||||
public class DocumentUndoProvider {
|
||||
private static final Key<Boolean> UNDOING_EDITOR_CHANGE = Key.create("DocumentUndoProvider.UNDOING_EDITOR_CHANGE");
|
||||
|
||||
DocumentUndoProvider(@Nullable Project project, @NotNull MessageBusConnection busConnection) {
|
||||
|
||||
Reference in New Issue
Block a user