Skip to content

Commit e8620ae

Browse files
committed
Refactor code
1 parent 2a00bbf commit e8620ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+209
-300
lines changed

app/src/main/java/com/duy/ccppcompiler/compiler/shell/OutputParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
import com.duy.ide.diagnostic.Diagnostic;
2020
import com.duy.ide.diagnostic.DiagnosticFactory;
2121
import com.duy.ide.diagnostic.DiagnosticsCollector;
22-
import com.duy.ide.diagnostic.Kind;
22+
import com.duy.ide.diagnostic.model.Kind;
2323

2424
import java.io.LineNumberReader;
2525
import java.io.StringReader;
2626
import java.util.regex.Matcher;
2727
import java.util.regex.Pattern;
2828

29-
import static com.duy.ide.diagnostic.Kind.OTHER;
29+
import static com.duy.ide.diagnostic.model.Kind.OTHER;
3030

3131
/**
3232
* https://gcc.gnu.org/onlinedocs/gcc-3.3.5/gnat_ug_unx/Output-and-Error-Message-Control.html

editor/src/main/assets/templates/java.template

Whitespace-only changes.

editor/src/main/java/android/core/text/SpannableStringBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
import android.text.style.URLSpan;
4747
import android.util.Log;
4848

49-
import com.duy.ide.editor.span.ErrorSpan;
49+
import android.core.text.style.ErrorSpan;
5050

5151
import java.lang.reflect.Array;
5252

editor/src/main/java/com/duy/ide/editor/span/CustomUnderlineSpan.java renamed to editor/src/main/java/android/core/text/style/CustomUnderlineSpan.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
/*
2-
* Copyright 2018 Mr Duy
2+
* Copyright (C) 2018 Duy Tran Le
33
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
78
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
913
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1516
*/
1617

17-
package com.duy.ide.editor.span;
18+
package android.core.text.style;
1819

1920
import android.graphics.Canvas;
2021
import android.graphics.DashPathEffect;

editor/src/main/java/com/duy/ide/editor/span/ErrorSpan.java renamed to editor/src/main/java/android/core/text/style/ErrorSpan.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
/*
2-
* Copyright 2018 Mr Duy
2+
* Copyright (C) 2018 Duy Tran Le
33
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
78
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
913
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1516
*/
1617

17-
package com.duy.ide.editor.span;
18+
package android.core.text.style;
1819

1920
import android.os.Parcel;
2021
import android.os.Parcelable;

editor/src/main/java/com/duy/ide/editor/utils/IOUtils.java renamed to editor/src/main/java/com/duy/common/utils/IOUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.duy.ide.editor.utils;
1+
package com.duy.common.utils;
22

33
import java.io.File;
44

editor/src/main/java/com/duy/ide/editor/view/TintImageView.java renamed to editor/src/main/java/com/duy/common/view/TintImageView.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
/*
2-
* Copyright 2018 Mr Duy
2+
* Copyright (C) 2018 Duy Tran Le
33
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
78
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
913
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1516
*/
1617

17-
package com.duy.ide.editor.view;
18+
package com.duy.common.view;
1819

1920
import android.content.Context;
2021
import android.content.res.ColorStateList;

editor/src/main/java/com/duy/ide/core/SimpleEditorActivity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@
5252
import com.duy.common.StoreUtil;
5353
import com.duy.file.explorer.FileExplorerActivity;
5454
import com.duy.ide.diagnostic.DiagnosticPresenter;
55-
import com.duy.ide.editor.dialogs.DialogNewFile;
55+
import com.duy.ide.file.dialogs.DialogNewFile;
5656
import com.duy.ide.editor.editor.BuildConfig;
5757
import com.duy.ide.editor.editor.R;
58-
import com.duy.ide.filemanager.FileManager;
59-
import com.duy.ide.filemanager.SaveListener;
60-
import com.duy.ide.diagnostic.DiagnosticFragment;
58+
import com.duy.ide.file.FileManager;
59+
import com.duy.ide.file.SaveListener;
60+
import com.duy.ide.diagnostic.view.DiagnosticFragment;
6161
import com.jecelyin.common.utils.DLog;
6262
import com.jecelyin.common.utils.IOUtils;
6363
import com.jecelyin.common.utils.SysUtils;

editor/src/main/java/com/duy/ide/diagnostic/Diagnostic.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
import android.os.Parcelable;
2222
import android.support.annotation.Nullable;
2323

24-
import com.duy.ide.suggestion.ISuggestion;
24+
import com.duy.ide.diagnostic.model.Kind;
25+
import com.duy.ide.diagnostic.suggestion.ISuggestion;
2526

2627
/**
2728
* Created by Duy on 28-Apr-18.

editor/src/main/java/com/duy/ide/diagnostic/DiagnosticClickListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import android.view.View;
2121

22-
import com.duy.ide.suggestion.ISuggestion;
22+
import com.duy.ide.diagnostic.suggestion.ISuggestion;
2323

2424
/**
2525
* Created by Duy on 28-Apr-18.

0 commit comments

Comments
 (0)