Skip to content

Commit

Permalink
upload
Browse files Browse the repository at this point in the history
  • Loading branch information
tranleduy2000 committed Feb 15, 2018
1 parent 1e43a28 commit 9c235d1
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 18 deletions.
16 changes: 16 additions & 0 deletions .idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import com.duy.pascal.interperter.declaration.Name;
import com.duy.pascal.interperter.declaration.lang.types.Type;
import com.duy.pascal.ui.autocomplete.completion.util.CodeTemplate;
import com.duy.pascal.ui.editor.view.CodeSuggestsEditText;

/**
Expand Down Expand Up @@ -62,7 +63,7 @@ public String getInsertText() {

@Override
public String getHeader() {
return name.getOriginName().replace(CodeSuggestsEditText.CURSOR, "");
return name.getOriginName().replace(CodeTemplate.CURSOR, "");
}

@ItemKind
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import android.support.annotation.Nullable;

import com.duy.pascal.interperter.declaration.Name;
import com.duy.pascal.ui.editor.view.CodeSuggestsEditText;
import com.duy.pascal.ui.autocomplete.completion.util.CodeTemplate;

/**
* Created by Duy on 11/1/2017.
Expand All @@ -33,8 +33,8 @@ public KeyWordDescription(@NonNull String name, @Nullable String description) {

@Override
public String getInsertText() {
if (!name.getOriginName().contains(CodeSuggestsEditText.CURSOR)) {
return name.getOriginName() + " " + CodeSuggestsEditText.CURSOR;
if (!name.getOriginName().contains(CodeTemplate.CURSOR)) {
return name.getOriginName() + " " + CodeTemplate.CURSOR;
} else {
return name.getOriginName();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import com.duy.pascal.interperter.declaration.Name;
import com.duy.pascal.interperter.declaration.lang.types.Type;
import com.duy.pascal.ui.editor.view.CodeSuggestsEditText;
import com.duy.pascal.ui.autocomplete.completion.util.CodeTemplate;

/**
* Created by Duy on 9/24/2017.
Expand All @@ -38,6 +38,6 @@ public String getHeader() {

@Override
public String getInsertText() {
return String.format("%s%s", name.getOriginName(), CodeSuggestsEditText.CURSOR);
return String.format("%s%s", name.getOriginName(), CodeTemplate.CURSOR);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,8 @@ public abstract class HighlightEditor extends CodeSuggestsEditText implements Vi
public static final int SYNTAX_DELAY_MILLIS_SHORT = 100;
public static final int SYNTAX_DELAY_MILLIS_LONG = 700;
public static final int CHARS_TO_COLOR = 2500;
private final Handler mHandler = new Handler();

public boolean mShowLines = true;
public boolean mWordWrap = true;

protected Paint mPaintNumbers;
protected Paint mPaintHighlight;
protected int mPaddingDP = 4;
Expand All @@ -92,7 +89,9 @@ public abstract class HighlightEditor extends CodeSuggestsEditText implements Vi
* the Max size of the view
*/
protected Point mMaxSize;
private IEditorColorScheme mCodeTheme = new CodeTheme(true);
private Handler mHandler;
private Runnable mPostHighlight;
private IEditorColorScheme mCodeTheme;
private boolean mCanEdit = true;
@Nullable
private ScrollView mVerticalScroll;
Expand All @@ -112,29 +111,36 @@ public abstract class HighlightEditor extends CodeSuggestsEditText implements Vi
*/
private EditTextChangeListener mChangeListener;
private CodeHighlighter mCodeHighlighter;
private final Runnable mPostHighlight = new Runnable() {
@Override
public void run() {
highlightText();
}
};
private BracketHighlighter mBracketHighlighter;

public HighlightEditor(Context context, AttributeSet attrs) {
super(context, attrs);

}

public HighlightEditor(Context context) {
super(context);

}

public HighlightEditor(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);

}

@CallSuper
protected void setup(Context context) {
super.setup(context);
mHandler = new Handler();
mPostHighlight = new Runnable() {
@Override
public void run() {
highlightText();
}
};
mHandler = new Handler();
mCodeTheme = new CodeTheme(true);

mLineUtils = new LineUtils();
mPaintNumbers = new Paint();
mPaintNumbers.setColor(getResources().getColor(R.color.color_number_color));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
* <p>
* Created by Duy on 15-Mar-17.
*/

class UndoRedoSupportEditText extends HighlightEditor {
public abstract class UndoRedoSupportEditText extends HighlightEditor {

private UndoRedoHelper mUndoRedoHelper;
private KeySettings mSettings;
Expand Down
4 changes: 4 additions & 0 deletions upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
git status
git add .
git commit -m "upload"
git push

0 comments on commit 9c235d1

Please sign in to comment.