Skip to content

Commit

Permalink
Merge branch 'mazter' of https://github.com/SpartanRefactoring/Main i…
Browse files Browse the repository at this point in the history
…nto mazter
  • Loading branch information
AnnaBel7 committed Jul 3, 2017
2 parents b2efbbf + e020874 commit 26cabbc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public class AddTipperUI extends JFrame {
public AddTipperUI() {
initComponents();

setSize(600, 800);
setSize(600, 600);
setTitle("Add New Tipper");
setLocationRelativeTo(null);
matcherTextArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
replacerTextArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

import com.intellij.psi.*;
import com.intellij.psi.impl.source.tree.java.PsiLambdaExpressionImpl;
import il.org.spartan.Leonidas.auxilary_layer.ExampleMapFactory;
import il.org.spartan.Leonidas.auxilary_layer.PsiRewrite;
import il.org.spartan.Leonidas.auxilary_layer.iz;
import il.org.spartan.Leonidas.plugin.tipping.Tip;
import il.org.spartan.Leonidas.plugin.tipping.Tipper;

import java.util.Map;

import static il.org.spartan.Leonidas.auxilary_layer.step.*;

/**
Expand Down Expand Up @@ -73,4 +76,10 @@ public Class<? extends PsiLambdaExpression> getOperableType() {
return PsiLambdaExpressionImpl.class;
}

@Override
public Map<String, String> getExamples() {
return new ExampleMapFactory()
.put("() -> {return x;}", "() -> x")
.map();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import org.eclipse.jgit.api.errors.*;
import org.eclipse.jgit.transport.*;
import org.eclipse.ui.*;
import static org.eclipse.jgit.transport.RemoteRefUpdate.Status.*;

import fluent.ly.*;

/** Git push command.
* @author Ori Roth
Expand All @@ -23,13 +26,20 @@ public class GitPushOperation extends GitOperation {
@Override @SuppressWarnings("unused") protected void gitOperation(final Git g) {
try {
for (final PushResult p : g.push().call())
if (p.getRemoteUpdates().size() == 1)
for (final RemoteRefUpdate ¢ : p.getRemoteUpdates())
if (¢.getStatus() == RemoteRefUpdate.Status.UP_TO_DATE) {
if (p.getRemoteUpdates().size() == 1) {
for (final RemoteRefUpdate ¢ : p.getRemoteUpdates()) {
if (¢.getStatus() == UP_TO_DATE) {
displayMessage("No commits to push");
return;
}
} catch (final InvalidRemoteException ¢) {
else if(¢.getStatus() != OK) {
displayMessage("Git Error: Pull failed");
return;
}
}
}
}
catch (final InvalidRemoteException ¢) {
displayMessage("Git Error: Push failed due to an invalid remote");
return;
} catch (final TransportException ¢) {
Expand Down

0 comments on commit 26cabbc

Please sign in to comment.