From fc048c9bd6cbd7e2f2342d0998980d21da731bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 12:27:28 +0900 Subject: [PATCH 001/217] Init WIP --- .../nem/lacerta/processor/BlankFragment.java | 64 +++++++++++++++++++ .../src/main/res/layout/fragment_blank.xml | 14 ++++ processor/src/main/res/values/strings.xml | 4 ++ 3 files changed, 82 insertions(+) create mode 100644 processor/src/main/java/one/nem/lacerta/processor/BlankFragment.java create mode 100644 processor/src/main/res/layout/fragment_blank.xml create mode 100644 processor/src/main/res/values/strings.xml diff --git a/processor/src/main/java/one/nem/lacerta/processor/BlankFragment.java b/processor/src/main/java/one/nem/lacerta/processor/BlankFragment.java new file mode 100644 index 00000000..e41033b7 --- /dev/null +++ b/processor/src/main/java/one/nem/lacerta/processor/BlankFragment.java @@ -0,0 +1,64 @@ +package one.nem.lacerta.processor; + +import android.os.Bundle; + +import androidx.fragment.app.Fragment; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +/** + * A simple {@link Fragment} subclass. + * Use the {@link BlankFragment#newInstance} factory method to + * create an instance of this fragment. + */ +public class BlankFragment extends Fragment { + + // TODO: Rename parameter arguments, choose names that match + // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER + private static final String ARG_PARAM1 = "param1"; + private static final String ARG_PARAM2 = "param2"; + + // TODO: Rename and change types of parameters + private String mParam1; + private String mParam2; + + public BlankFragment() { + // Required empty public constructor + } + + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param param1 Parameter 1. + * @param param2 Parameter 2. + * @return A new instance of fragment BlankFragment. + */ + // TODO: Rename and change types and number of parameters + public static BlankFragment newInstance(String param1, String param2) { + BlankFragment fragment = new BlankFragment(); + Bundle args = new Bundle(); + args.putString(ARG_PARAM1, param1); + args.putString(ARG_PARAM2, param2); + fragment.setArguments(args); + return fragment; + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (getArguments() != null) { + mParam1 = getArguments().getString(ARG_PARAM1); + mParam2 = getArguments().getString(ARG_PARAM2); + } + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_blank, container, false); + } +} \ No newline at end of file diff --git a/processor/src/main/res/layout/fragment_blank.xml b/processor/src/main/res/layout/fragment_blank.xml new file mode 100644 index 00000000..41efb72a --- /dev/null +++ b/processor/src/main/res/layout/fragment_blank.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/processor/src/main/res/values/strings.xml b/processor/src/main/res/values/strings.xml new file mode 100644 index 00000000..6048840e --- /dev/null +++ b/processor/src/main/res/values/strings.xml @@ -0,0 +1,4 @@ + + + Hello blank fragment + \ No newline at end of file From eb1ad1f4afffaab008722290439c4174ea734527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 12:27:50 +0900 Subject: [PATCH 002/217] Init --- .../nem/lacerta/processor/BlankFragment.java | 64 ------------------- .../one/nem/lacerta/processor/placeholder | 0 .../src/main/res/layout/fragment_blank.xml | 14 ---- 3 files changed, 78 deletions(-) delete mode 100644 processor/src/main/java/one/nem/lacerta/processor/BlankFragment.java create mode 100644 processor/src/main/java/one/nem/lacerta/processor/placeholder delete mode 100644 processor/src/main/res/layout/fragment_blank.xml diff --git a/processor/src/main/java/one/nem/lacerta/processor/BlankFragment.java b/processor/src/main/java/one/nem/lacerta/processor/BlankFragment.java deleted file mode 100644 index e41033b7..00000000 --- a/processor/src/main/java/one/nem/lacerta/processor/BlankFragment.java +++ /dev/null @@ -1,64 +0,0 @@ -package one.nem.lacerta.processor; - -import android.os.Bundle; - -import androidx.fragment.app.Fragment; - -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; - -/** - * A simple {@link Fragment} subclass. - * Use the {@link BlankFragment#newInstance} factory method to - * create an instance of this fragment. - */ -public class BlankFragment extends Fragment { - - // TODO: Rename parameter arguments, choose names that match - // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER - private static final String ARG_PARAM1 = "param1"; - private static final String ARG_PARAM2 = "param2"; - - // TODO: Rename and change types of parameters - private String mParam1; - private String mParam2; - - public BlankFragment() { - // Required empty public constructor - } - - /** - * Use this factory method to create a new instance of - * this fragment using the provided parameters. - * - * @param param1 Parameter 1. - * @param param2 Parameter 2. - * @return A new instance of fragment BlankFragment. - */ - // TODO: Rename and change types and number of parameters - public static BlankFragment newInstance(String param1, String param2) { - BlankFragment fragment = new BlankFragment(); - Bundle args = new Bundle(); - args.putString(ARG_PARAM1, param1); - args.putString(ARG_PARAM2, param2); - fragment.setArguments(args); - return fragment; - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - if (getArguments() != null) { - mParam1 = getArguments().getString(ARG_PARAM1); - mParam2 = getArguments().getString(ARG_PARAM2); - } - } - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, - Bundle savedInstanceState) { - // Inflate the layout for this fragment - return inflater.inflate(R.layout.fragment_blank, container, false); - } -} \ No newline at end of file diff --git a/processor/src/main/java/one/nem/lacerta/processor/placeholder b/processor/src/main/java/one/nem/lacerta/processor/placeholder new file mode 100644 index 00000000..e69de29b diff --git a/processor/src/main/res/layout/fragment_blank.xml b/processor/src/main/res/layout/fragment_blank.xml deleted file mode 100644 index 41efb72a..00000000 --- a/processor/src/main/res/layout/fragment_blank.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - \ No newline at end of file From d0308479920fa0500b18c5bf90b144cc616cde7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 12:42:50 +0900 Subject: [PATCH 003/217] =?UTF-8?q?=E4=BE=9D=E5=AD=98=E9=96=A2=E4=BF=82?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- processor/build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/processor/build.gradle b/processor/build.gradle index cc9c26a7..24d26e58 100644 --- a/processor/build.gradle +++ b/processor/build.gradle @@ -32,4 +32,9 @@ dependencies { testImplementation libs.junit androidTestImplementation libs.androidx.test.ext.junit androidTestImplementation libs.androidx.test.espresso.core + + implementation project(':model') + implementation project(':source') + implementation project(':utils') + implementation project(':data') } \ No newline at end of file From 144ff7dfd2b4f34e0d00ba9c3ab4cdcf210b8a6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 12:44:42 +0900 Subject: [PATCH 004/217] =?UTF-8?q?DocumentProcessor=20=E3=83=AA=E3=83=9D?= =?UTF-8?q?=E3=82=B8=E3=83=88=E3=83=AA=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/one/nem/lacerta/processor/DocumentProcessor.java | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java diff --git a/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java b/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java new file mode 100644 index 00000000..4e6631e6 --- /dev/null +++ b/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java @@ -0,0 +1,4 @@ +package one.nem.lacerta.processor; + +public interface DocumentProcessor { +} From 14e7fbd1278ce032d25e2a469382b73eded8e067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 12:46:49 +0900 Subject: [PATCH 005/217] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/one/nem/lacerta/processor/impl/placeholder | 0 .../src/main/java/one/nem/lacerta/processor/module/placeholder | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 processor/src/main/java/one/nem/lacerta/processor/impl/placeholder create mode 100644 processor/src/main/java/one/nem/lacerta/processor/module/placeholder diff --git a/processor/src/main/java/one/nem/lacerta/processor/impl/placeholder b/processor/src/main/java/one/nem/lacerta/processor/impl/placeholder new file mode 100644 index 00000000..e69de29b diff --git a/processor/src/main/java/one/nem/lacerta/processor/module/placeholder b/processor/src/main/java/one/nem/lacerta/processor/module/placeholder new file mode 100644 index 00000000..e69de29b From 15beb0af57f325972f3e0796d12a89283c200c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 12:47:23 +0900 Subject: [PATCH 006/217] =?UTF-8?q?Impl,=20Module=E3=82=AF=E3=83=A9?= =?UTF-8?q?=E3=82=B9=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/processor/impl/DocumentProcessorImpl.java | 4 ++++ .../nem/lacerta/processor/module/DocumentProcessorModule.java | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java create mode 100644 processor/src/main/java/one/nem/lacerta/processor/module/DocumentProcessorModule.java diff --git a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java new file mode 100644 index 00000000..055da936 --- /dev/null +++ b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java @@ -0,0 +1,4 @@ +package one.nem.lacerta.processor.impl; + +public class DocumentProcessorImpl { +} diff --git a/processor/src/main/java/one/nem/lacerta/processor/module/DocumentProcessorModule.java b/processor/src/main/java/one/nem/lacerta/processor/module/DocumentProcessorModule.java new file mode 100644 index 00000000..0f903a8e --- /dev/null +++ b/processor/src/main/java/one/nem/lacerta/processor/module/DocumentProcessorModule.java @@ -0,0 +1,4 @@ +package one.nem.lacerta.processor.module; + +public class DocumentProcessorModule { +} From 59e32fe6964092ccc2d92e0046e83408144f2d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:00:22 +0900 Subject: [PATCH 007/217] =?UTF-8?q?Factory=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lacerta/processor/factory/DocumentProcessorFactory.java | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 processor/src/main/java/one/nem/lacerta/processor/factory/DocumentProcessorFactory.java diff --git a/processor/src/main/java/one/nem/lacerta/processor/factory/DocumentProcessorFactory.java b/processor/src/main/java/one/nem/lacerta/processor/factory/DocumentProcessorFactory.java new file mode 100644 index 00000000..1d0bdcda --- /dev/null +++ b/processor/src/main/java/one/nem/lacerta/processor/factory/DocumentProcessorFactory.java @@ -0,0 +1,4 @@ +package one.nem.lacerta.processor.factory; + +public class DocumentProcessorFactory { +} From a298247824d27b5af2c8a9492cfd75fb911b4c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:09:00 +0900 Subject: [PATCH 008/217] WIP --- .../nem/lacerta/processor/DocumentProcessor.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java b/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java index 4e6631e6..e822e683 100644 --- a/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java +++ b/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java @@ -1,4 +1,20 @@ package one.nem.lacerta.processor; +import android.graphics.Bitmap; + public interface DocumentProcessor { + + // ページ操作 + void addNewPageToLast(Bitmap bitmap); + void addNewPageAfterIndex(Bitmap bitmap, int index); + void addNewPageBeforeIndex(Bitmap bitmap, int index); + void removePageAtIndex(int index); + + // 更新 + void updatePageAtIndex(Bitmap bitmap, int index); + + // ページ取得 + Bitmap getPageAtIndex(int index); + int getPageCount(); + } From 8a851e4f117484f760107cf71bd5ae146dc31f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:26:59 +0900 Subject: [PATCH 009/217] =?UTF-8?q?=E3=83=AA=E3=83=9D=E3=82=B8=E3=83=88?= =?UTF-8?q?=E3=83=AA=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/one/nem/lacerta/processor/DocumentProcessor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java b/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java index e822e683..394760ef 100644 --- a/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java +++ b/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java @@ -6,6 +6,7 @@ public interface DocumentProcessor { // ページ操作 void addNewPageToLast(Bitmap bitmap); + void addNewPagesToLast(Bitmap[] bitmaps); void addNewPageAfterIndex(Bitmap bitmap, int index); void addNewPageBeforeIndex(Bitmap bitmap, int index); void removePageAtIndex(int index); From 0f4ce1b9b17bbd1482580a1396a241a08e621aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:27:28 +0900 Subject: [PATCH 010/217] =?UTF-8?q?Impl=E5=AE=9F=E8=A3=85=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processor/impl/DocumentProcessorImpl.java | 45 ++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java index 055da936..9c06be58 100644 --- a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java +++ b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java @@ -1,4 +1,47 @@ package one.nem.lacerta.processor.impl; -public class DocumentProcessorImpl { +import android.graphics.Bitmap; + +import one.nem.lacerta.processor.DocumentProcessor; + +public class DocumentProcessorImpl implements DocumentProcessor{ + @Override + public void addNewPageToLast(Bitmap bitmap) { + + } + + @Override + public void addNewPagesToLast(Bitmap[] bitmaps) { + + } + + @Override + public void addNewPageAfterIndex(Bitmap bitmap, int index) { + + } + + @Override + public void addNewPageBeforeIndex(Bitmap bitmap, int index) { + + } + + @Override + public void removePageAtIndex(int index) { + + } + + @Override + public void updatePageAtIndex(Bitmap bitmap, int index) { + + } + + @Override + public Bitmap getPageAtIndex(int index) { + return null; + } + + @Override + public int getPageCount() { + return 0; + } } From 947c2aa2ab1a396926aaa1630bee14820e2dbd40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:29:16 +0900 Subject: [PATCH 011/217] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=9D=E3=83=BC?= =?UTF-8?q?=E3=83=88=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nem/lacerta/processor/impl/DocumentProcessorImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java index 9c06be58..37c8128c 100644 --- a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java +++ b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java @@ -4,7 +4,12 @@ import android.graphics.Bitmap; import one.nem.lacerta.processor.DocumentProcessor; +import one.nem.lacerta.model.document.DocumentDetail; +import one.nem.lacerta.model.document.DocumentMeta; + public class DocumentProcessorImpl implements DocumentProcessor{ + + @Override public void addNewPageToLast(Bitmap bitmap) { From 0309864d0b4d37b1c30683fd9f992098668d260d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:29:53 +0900 Subject: [PATCH 012/217] =?UTF-8?q?=E4=BE=9D=E5=AD=98=E9=96=A2=E4=BF=82?= =?UTF-8?q?=E3=81=ABJGit=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- processor/build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/processor/build.gradle b/processor/build.gradle index 24d26e58..395009c8 100644 --- a/processor/build.gradle +++ b/processor/build.gradle @@ -33,6 +33,9 @@ dependencies { androidTestImplementation libs.androidx.test.ext.junit androidTestImplementation libs.androidx.test.espresso.core + // JGit + implementation 'org.eclipse.jgit:org.eclipse.jgit:6.8.0.202311291450-r' + implementation project(':model') implementation project(':source') implementation project(':utils') From 814dfd23fa31831f55b2439c15ea7c5c1eb2fbd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:31:04 +0900 Subject: [PATCH 013/217] =?UTF-8?q?=E4=BE=9D=E5=AD=98=E9=96=A2=E4=BF=82?= =?UTF-8?q?=E3=81=ABHilt=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- processor/build.gradle | 4 ++++ .../one/nem/lacerta/processor/impl/DocumentProcessorImpl.java | 3 +++ 2 files changed, 7 insertions(+) diff --git a/processor/build.gradle b/processor/build.gradle index 395009c8..ec1ea9b1 100644 --- a/processor/build.gradle +++ b/processor/build.gradle @@ -33,6 +33,10 @@ dependencies { androidTestImplementation libs.androidx.test.ext.junit androidTestImplementation libs.androidx.test.espresso.core + // DI + implementation libs.com.google.dagger.hilt.android + annotationProcessor libs.com.google.dagger.hilt.compiler + // JGit implementation 'org.eclipse.jgit:org.eclipse.jgit:6.8.0.202311291450-r' diff --git a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java index 37c8128c..58fd2d88 100644 --- a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java +++ b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java @@ -9,6 +9,9 @@ import one.nem.lacerta.model.document.DocumentMeta; public class DocumentProcessorImpl implements DocumentProcessor{ + private DocumentDetail documentDetail; + + @Override public void addNewPageToLast(Bitmap bitmap) { From 577453a4db4253e1596d8761b322a67f060facc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:35:41 +0900 Subject: [PATCH 014/217] =?UTF-8?q?=E3=83=A2=E3=82=B8=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/one/nem/lacerta/source/file/DocFiles.java | 4 ++++ .../main/java/one/nem/lacerta/source/file/factory/placeholder | 0 .../main/java/one/nem/lacerta/source/file/impl/placeholder | 0 .../main/java/one/nem/lacerta/source/file/module/placeholder | 0 4 files changed, 4 insertions(+) create mode 100644 source/src/main/java/one/nem/lacerta/source/file/DocFiles.java create mode 100644 source/src/main/java/one/nem/lacerta/source/file/factory/placeholder create mode 100644 source/src/main/java/one/nem/lacerta/source/file/impl/placeholder create mode 100644 source/src/main/java/one/nem/lacerta/source/file/module/placeholder diff --git a/source/src/main/java/one/nem/lacerta/source/file/DocFiles.java b/source/src/main/java/one/nem/lacerta/source/file/DocFiles.java new file mode 100644 index 00000000..522cb2bb --- /dev/null +++ b/source/src/main/java/one/nem/lacerta/source/file/DocFiles.java @@ -0,0 +1,4 @@ +package one.nem.lacerta.source.file; + +public interface DocFiles { +} diff --git a/source/src/main/java/one/nem/lacerta/source/file/factory/placeholder b/source/src/main/java/one/nem/lacerta/source/file/factory/placeholder new file mode 100644 index 00000000..e69de29b diff --git a/source/src/main/java/one/nem/lacerta/source/file/impl/placeholder b/source/src/main/java/one/nem/lacerta/source/file/impl/placeholder new file mode 100644 index 00000000..e69de29b diff --git a/source/src/main/java/one/nem/lacerta/source/file/module/placeholder b/source/src/main/java/one/nem/lacerta/source/file/module/placeholder new file mode 100644 index 00000000..e69de29b From 9fecefeb4ebf526e46ed1875ee8ee6090eca93e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:41:06 +0900 Subject: [PATCH 015/217] =?UTF-8?q?=E3=83=AA=E3=83=8D=E3=83=BC=E3=83=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/one/nem/lacerta/source/file/DocFiles.java | 4 ---- .../java/one/nem/lacerta/source/file/RepoFileManager.java | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) delete mode 100644 source/src/main/java/one/nem/lacerta/source/file/DocFiles.java create mode 100644 source/src/main/java/one/nem/lacerta/source/file/RepoFileManager.java diff --git a/source/src/main/java/one/nem/lacerta/source/file/DocFiles.java b/source/src/main/java/one/nem/lacerta/source/file/DocFiles.java deleted file mode 100644 index 522cb2bb..00000000 --- a/source/src/main/java/one/nem/lacerta/source/file/DocFiles.java +++ /dev/null @@ -1,4 +0,0 @@ -package one.nem.lacerta.source.file; - -public interface DocFiles { -} diff --git a/source/src/main/java/one/nem/lacerta/source/file/RepoFileManager.java b/source/src/main/java/one/nem/lacerta/source/file/RepoFileManager.java new file mode 100644 index 00000000..99658f38 --- /dev/null +++ b/source/src/main/java/one/nem/lacerta/source/file/RepoFileManager.java @@ -0,0 +1,7 @@ +package one.nem.lacerta.source.file; + +public interface RepoFileManager { + + void + +} From aff7af76d4bbb62515d78560db18cb5d615ee8a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:44:36 +0900 Subject: [PATCH 016/217] =?UTF-8?q?Repository=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/one/nem/lacerta/source/file/RepoFileManager.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/src/main/java/one/nem/lacerta/source/file/RepoFileManager.java b/source/src/main/java/one/nem/lacerta/source/file/RepoFileManager.java index 99658f38..61efacde 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/RepoFileManager.java +++ b/source/src/main/java/one/nem/lacerta/source/file/RepoFileManager.java @@ -1,7 +1,13 @@ package one.nem.lacerta.source.file; +import android.graphics.Bitmap; + +import org.eclipse.jgit.lib.Repository; + public interface RepoFileManager { - void + void initRepoDir(); + void addImageByIndex(Bitmap bitmap, int index); + void deleteImageByIndex(int index); } From 1c5325711a4b2cdbe8ab42f15e03c883ac9fffdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:45:35 +0900 Subject: [PATCH 017/217] =?UTF-8?q?Impl=E3=82=AF=E3=83=A9=E3=82=B9Init?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/file/impl/RepoFileManagerImpl.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 source/src/main/java/one/nem/lacerta/source/file/impl/RepoFileManagerImpl.java diff --git a/source/src/main/java/one/nem/lacerta/source/file/impl/RepoFileManagerImpl.java b/source/src/main/java/one/nem/lacerta/source/file/impl/RepoFileManagerImpl.java new file mode 100644 index 00000000..8652cc9d --- /dev/null +++ b/source/src/main/java/one/nem/lacerta/source/file/impl/RepoFileManagerImpl.java @@ -0,0 +1,21 @@ +package one.nem.lacerta.source.file.impl; + +import android.graphics.Bitmap; +import one.nem.lacerta.source.file.RepoFileManager; + +public class RepoFileManagerImpl implements RepoFileManager{ + @Override + public void initRepoDir() { + + } + + @Override + public void addImageByIndex(Bitmap bitmap, int index) { + + } + + @Override + public void deleteImageByIndex(int index) { + + } +} From 865d8b994c90ad0c525a75dce280ad91fafc82be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:49:36 +0900 Subject: [PATCH 018/217] =?UTF-8?q?=E3=83=AA=E3=83=8D=E3=83=BC=E3=83=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{RepoFileManager.java => FileManager.java} | 4 +--- ...oFileManagerImpl.java => FileManagerImpl.java} | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) rename source/src/main/java/one/nem/lacerta/source/file/{RepoFileManager.java => FileManager.java} (71%) rename source/src/main/java/one/nem/lacerta/source/file/impl/{RepoFileManagerImpl.java => FileManagerImpl.java} (56%) diff --git a/source/src/main/java/one/nem/lacerta/source/file/RepoFileManager.java b/source/src/main/java/one/nem/lacerta/source/file/FileManager.java similarity index 71% rename from source/src/main/java/one/nem/lacerta/source/file/RepoFileManager.java rename to source/src/main/java/one/nem/lacerta/source/file/FileManager.java index 61efacde..cd22a139 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/RepoFileManager.java +++ b/source/src/main/java/one/nem/lacerta/source/file/FileManager.java @@ -2,9 +2,7 @@ package one.nem.lacerta.source.file; import android.graphics.Bitmap; -import org.eclipse.jgit.lib.Repository; - -public interface RepoFileManager { +public interface FileManager { void initRepoDir(); void addImageByIndex(Bitmap bitmap, int index); diff --git a/source/src/main/java/one/nem/lacerta/source/file/impl/RepoFileManagerImpl.java b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java similarity index 56% rename from source/src/main/java/one/nem/lacerta/source/file/impl/RepoFileManagerImpl.java rename to source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java index 8652cc9d..bf851fd4 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/impl/RepoFileManagerImpl.java +++ b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java @@ -1,9 +1,15 @@ package one.nem.lacerta.source.file.impl; import android.graphics.Bitmap; -import one.nem.lacerta.source.file.RepoFileManager; -public class RepoFileManagerImpl implements RepoFileManager{ +import java.nio.file.Path; + +import one.nem.lacerta.source.file.FileManager; + +public class FileManagerImpl implements FileManager { + + private Path rootDir; + @Override public void initRepoDir() { @@ -18,4 +24,9 @@ public class RepoFileManagerImpl implements RepoFileManager{ public void deleteImageByIndex(int index) { } + + // Internal + private void createDir() { + + } } From 7ba70cc84b0557084600e66f392f769dd9bf46d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:53:04 +0900 Subject: [PATCH 019/217] =?UTF-8?q?=E3=81=AA=E3=82=93=E3=81=8B=E3=82=82?= =?UTF-8?q?=E3=81=86=E5=85=A8=E9=83=A8=E5=A4=89=E3=81=88=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/source/file/FileManager.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/source/src/main/java/one/nem/lacerta/source/file/FileManager.java b/source/src/main/java/one/nem/lacerta/source/file/FileManager.java index cd22a139..56b50791 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/FileManager.java +++ b/source/src/main/java/one/nem/lacerta/source/file/FileManager.java @@ -2,10 +2,18 @@ package one.nem.lacerta.source.file; import android.graphics.Bitmap; +import java.nio.file.Path; +import java.util.List; + public interface FileManager { - void initRepoDir(); - void addImageByIndex(Bitmap bitmap, int index); - void deleteImageByIndex(int index); + Path getRootDir(); + void changeDir(String dirName); //cd + void backDir(); //cd .. + void backRootDir(); //cd / + List getDirList(); //ls + List getFileList(); //ls + void createDir(); + void removeDir(); } From b28a939792907f950147a299dcfd102655e07d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:54:45 +0900 Subject: [PATCH 020/217] =?UTF-8?q?Impl=E5=AE=9F=E8=A3=85=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/file/impl/FileManagerImpl.java | 47 +++++++++++++++++-- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java index bf851fd4..390b7975 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java +++ b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java @@ -3,30 +3,67 @@ package one.nem.lacerta.source.file.impl; import android.graphics.Bitmap; import java.nio.file.Path; +import java.util.List; + +import javax.inject.Inject; import one.nem.lacerta.source.file.FileManager; public class FileManagerImpl implements FileManager { + // RootDir private Path rootDir; + // CurrentDir + private Path currentDir; + + // Internal Methods + private Path convertPath(String path) { + return null; + } + + @Inject + public FileManagerImpl(Path rootDir) { + // TODO-rca: 未実装 + } + @Override - public void initRepoDir() { + public Path getRootDir() { + return null; + } + + @Override + public void changeDir(String dirName) { } @Override - public void addImageByIndex(Bitmap bitmap, int index) { + public void backDir() { } @Override - public void deleteImageByIndex(int index) { + public void backRootDir() { } - // Internal - private void createDir() { + @Override + public List getDirList() { + return null; + } + + @Override + public List getFileList() { + return null; + } + + @Override + public void createDir() { + + } + + @Override + public void removeDir() { } } From e3d682691299bd37e2629ce278bf45558f2ec617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 14:59:12 +0900 Subject: [PATCH 021/217] =?UTF-8?q?Impl=E5=AE=9F=E8=A3=85=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/file/impl/FileManagerImpl.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java index 390b7975..43e19657 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java +++ b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java @@ -3,6 +3,7 @@ package one.nem.lacerta.source.file.impl; import android.graphics.Bitmap; import java.nio.file.Path; +import java.util.Arrays; import java.util.List; import javax.inject.Inject; @@ -19,7 +20,12 @@ public class FileManagerImpl implements FileManager { // Internal Methods private Path convertPath(String path) { - return null; + Path convertedPath = currentDir.resolve(path); + if (convertedPath.startsWith(rootDir)) { // 異常なパスの場合はnullを返す // TODO-rca: エラーハンドリング + return convertedPath; + } else { + return null; + } } @Inject @@ -29,27 +35,28 @@ public class FileManagerImpl implements FileManager { @Override public Path getRootDir() { - return null; + return rootDir; } @Override public void changeDir(String dirName) { - + this.currentDir = rootDir.resolve(dirName); } @Override public void backDir() { - + this.currentDir = currentDir.getParent(); } @Override public void backRootDir() { - + this.currentDir = rootDir; } @Override public List getDirList() { - return null; + // currentDirにあるディレクトリの一覧を返す + return Arrays.asList(currentDir.toFile().list()); } @Override From f2dfd2ca56abd84cf383c1c4e0783ed6ced9e2c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 15:02:02 +0900 Subject: [PATCH 022/217] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/one/nem/lacerta/source/file/model/placeholder | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 source/src/main/java/one/nem/lacerta/source/file/model/placeholder diff --git a/source/src/main/java/one/nem/lacerta/source/file/model/placeholder b/source/src/main/java/one/nem/lacerta/source/file/model/placeholder new file mode 100644 index 00000000..e69de29b From bbad45fbbdaf820571a8f623a86eb95bdb61c340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 15:03:44 +0900 Subject: [PATCH 023/217] WIP --- .../nem/lacerta/source/file/model/DirectoryItem.java | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 source/src/main/java/one/nem/lacerta/source/file/model/DirectoryItem.java diff --git a/source/src/main/java/one/nem/lacerta/source/file/model/DirectoryItem.java b/source/src/main/java/one/nem/lacerta/source/file/model/DirectoryItem.java new file mode 100644 index 00000000..059e95ec --- /dev/null +++ b/source/src/main/java/one/nem/lacerta/source/file/model/DirectoryItem.java @@ -0,0 +1,11 @@ +package one.nem.lacerta.source.file.model; + +public class DirectoryItem { + + String name; + String path; + boolean isDirectory; + String extension; + long size; + +} From 1bac068c8cbdea7917bbd8002756fa8c00c41c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 15:03:51 +0900 Subject: [PATCH 024/217] Revert "WIP" This reverts commit bbad45fbbdaf820571a8f623a86eb95bdb61c340. --- .../nem/lacerta/source/file/model/DirectoryItem.java | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 source/src/main/java/one/nem/lacerta/source/file/model/DirectoryItem.java diff --git a/source/src/main/java/one/nem/lacerta/source/file/model/DirectoryItem.java b/source/src/main/java/one/nem/lacerta/source/file/model/DirectoryItem.java deleted file mode 100644 index 059e95ec..00000000 --- a/source/src/main/java/one/nem/lacerta/source/file/model/DirectoryItem.java +++ /dev/null @@ -1,11 +0,0 @@ -package one.nem.lacerta.source.file.model; - -public class DirectoryItem { - - String name; - String path; - boolean isDirectory; - String extension; - long size; - -} From fd74f5eab017c12fd1d3d83a61b7104a68f0bd66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 15:03:51 +0900 Subject: [PATCH 025/217] =?UTF-8?q?Revert=20"=E3=83=91=E3=83=83=E3=82=B1?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E6=95=B4=E7=90=86"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit f2dfd2ca56abd84cf383c1c4e0783ed6ced9e2c1. --- .../src/main/java/one/nem/lacerta/source/file/model/placeholder | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 source/src/main/java/one/nem/lacerta/source/file/model/placeholder diff --git a/source/src/main/java/one/nem/lacerta/source/file/model/placeholder b/source/src/main/java/one/nem/lacerta/source/file/model/placeholder deleted file mode 100644 index e69de29b..00000000 From d0543d89b90b99726ff67abf724a6ceb05a8a616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 15:05:56 +0900 Subject: [PATCH 026/217] =?UTF-8?q?getList=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nem/lacerta/source/file/FileManager.java | 3 +-- .../source/file/impl/FileManagerImpl.java | 24 ++++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/source/src/main/java/one/nem/lacerta/source/file/FileManager.java b/source/src/main/java/one/nem/lacerta/source/file/FileManager.java index 56b50791..0fa4062b 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/FileManager.java +++ b/source/src/main/java/one/nem/lacerta/source/file/FileManager.java @@ -11,8 +11,7 @@ public interface FileManager { void changeDir(String dirName); //cd void backDir(); //cd .. void backRootDir(); //cd / - List getDirList(); //ls - List getFileList(); //ls + List getList(); void createDir(); void removeDir(); diff --git a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java index 43e19657..758737b1 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java +++ b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java @@ -2,7 +2,11 @@ package one.nem.lacerta.source.file.impl; import android.graphics.Bitmap; +import java.io.IOException; +import java.nio.file.DirectoryStream; +import java.nio.file.Files; import java.nio.file.Path; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -54,14 +58,18 @@ public class FileManagerImpl implements FileManager { } @Override - public List getDirList() { - // currentDirにあるディレクトリの一覧を返す - return Arrays.asList(currentDir.toFile().list()); - } - - @Override - public List getFileList() { - return null; + public List getList() { + List list = new ArrayList<>(); + try (DirectoryStream stream = Files.newDirectoryStream(currentDir)) { + for (Path entry : stream) { + if (Files.isDirectory(entry)) { + list.add(entry); + } + } + } catch (IOException e) { + e.printStackTrace(); + } + return list; } @Override From 5f74123c63f836ed8b3e69c50ce7457d914461c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 15:06:56 +0900 Subject: [PATCH 027/217] =?UTF-8?q?getList=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/source/file/impl/FileManagerImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java index 758737b1..76a55e9a 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java +++ b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java @@ -61,10 +61,8 @@ public class FileManagerImpl implements FileManager { public List getList() { List list = new ArrayList<>(); try (DirectoryStream stream = Files.newDirectoryStream(currentDir)) { - for (Path entry : stream) { - if (Files.isDirectory(entry)) { - list.add(entry); - } + for (Path entry : stream) { // TODO-rca: エラーハンドリング, 効率化 + list.add(entry); } } catch (IOException e) { e.printStackTrace(); From 7c0d82f25c2ac6580ddc5b62f10e20b12947e39b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 15:07:32 +0900 Subject: [PATCH 028/217] =?UTF-8?q?create/remove=E3=81=AE=E5=BC=95?= =?UTF-8?q?=E6=95=B0=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/one/nem/lacerta/source/file/FileManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/src/main/java/one/nem/lacerta/source/file/FileManager.java b/source/src/main/java/one/nem/lacerta/source/file/FileManager.java index 0fa4062b..1d2bdadf 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/FileManager.java +++ b/source/src/main/java/one/nem/lacerta/source/file/FileManager.java @@ -12,7 +12,7 @@ public interface FileManager { void backDir(); //cd .. void backRootDir(); //cd / List getList(); - void createDir(); - void removeDir(); + void createDir(String dirName); + void removeDir(String dirName); } From a0c4718b3a5af99fd27abd1415440f9a0a38ba77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 15:08:32 +0900 Subject: [PATCH 029/217] =?UTF-8?q?create/remove=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/source/file/impl/FileManagerImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java index 76a55e9a..653cf1dc 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java +++ b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java @@ -71,12 +71,12 @@ public class FileManagerImpl implements FileManager { } @Override - public void createDir() { - + public void createDir(String dirName) { + currentDir.resolve(dirName).toFile().mkdir(); // TODO-rca: エラーハンドリング } @Override - public void removeDir() { - + public void removeDir(String dirName) { + currentDir.resolve(dirName).toFile().delete(); // TODO-rca: エラーハンドリング } } From a1c87535c61dec0967c159970cd70747224411dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 15:09:15 +0900 Subject: [PATCH 030/217] =?UTF-8?q?Module=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/source/file/module/FileManagerModule.java | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 source/src/main/java/one/nem/lacerta/source/file/module/FileManagerModule.java diff --git a/source/src/main/java/one/nem/lacerta/source/file/module/FileManagerModule.java b/source/src/main/java/one/nem/lacerta/source/file/module/FileManagerModule.java new file mode 100644 index 00000000..4b920538 --- /dev/null +++ b/source/src/main/java/one/nem/lacerta/source/file/module/FileManagerModule.java @@ -0,0 +1,4 @@ +package one.nem.lacerta.source.file.module; + +public class FileManagerModule { +} From 29e0dca2c7e3d7aa7c749826f1c2b58fc2e4dad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 15:12:21 +0900 Subject: [PATCH 031/217] =?UTF-8?q?Module=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/file/module/FileManagerModule.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/src/main/java/one/nem/lacerta/source/file/module/FileManagerModule.java b/source/src/main/java/one/nem/lacerta/source/file/module/FileManagerModule.java index 4b920538..68a35913 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/module/FileManagerModule.java +++ b/source/src/main/java/one/nem/lacerta/source/file/module/FileManagerModule.java @@ -1,4 +1,20 @@ package one.nem.lacerta.source.file.module; +import java.nio.file.Path; + +import dagger.assisted.Assisted; +import dagger.assisted.AssistedInject; + public class FileManagerModule { + + private final Path rootDir; + + @AssistedInject + public FileManagerModule(@Assisted Path rootDir) { + this.rootDir = rootDir; + } + + public Path getRootDir() { + return rootDir; + } } From a23010b535f365fd6b75e959e6ffe5d61d6d7e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 15:13:31 +0900 Subject: [PATCH 032/217] =?UTF-8?q?Factory=E4=BD=9C=E6=88=90,=20=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/file/factory/FileManagerFactory.java | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 source/src/main/java/one/nem/lacerta/source/file/factory/FileManagerFactory.java diff --git a/source/src/main/java/one/nem/lacerta/source/file/factory/FileManagerFactory.java b/source/src/main/java/one/nem/lacerta/source/file/factory/FileManagerFactory.java new file mode 100644 index 00000000..c4617e85 --- /dev/null +++ b/source/src/main/java/one/nem/lacerta/source/file/factory/FileManagerFactory.java @@ -0,0 +1,11 @@ +package one.nem.lacerta.source.file.factory; + +import java.nio.file.Path; + +import dagger.assisted.AssistedFactory; +import one.nem.lacerta.source.file.FileManager; + +@AssistedFactory +public interface FileManagerFactory { + FileManager create(Path rootDir); +} From c1b3c06a9d560f1b280a0bcca94e7f676555efb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 16:38:59 +0900 Subject: [PATCH 033/217] =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=83=9E=E3=83=8D=E3=83=BC=E3=82=B8=E3=83=A3=E3=83=BC=E3=81=AE?= =?UTF-8?q?=E3=83=87=E3=83=90=E3=83=83=E3=82=B0=E7=94=A8=E3=83=95=E3=83=A9?= =?UTF-8?q?=E3=82=B0=E3=83=A1=E3=83=B3=E3=83=88=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DebugMenuFileManagerTesterFragment.java | 64 +++++++++++++++++++ ...ragment_debug_menu_file_manager_tester.xml | 14 ++++ 2 files changed, 78 insertions(+) create mode 100644 feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuFileManagerTesterFragment.java create mode 100644 feature/debug/src/main/res/layout/fragment_debug_menu_file_manager_tester.xml diff --git a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuFileManagerTesterFragment.java b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuFileManagerTesterFragment.java new file mode 100644 index 00000000..0f67603f --- /dev/null +++ b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuFileManagerTesterFragment.java @@ -0,0 +1,64 @@ +package one.nem.lacerta.feature.debug; + +import android.os.Bundle; + +import androidx.fragment.app.Fragment; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +/** + * A simple {@link Fragment} subclass. + * Use the {@link DebugMenuFileManagerTesterFragment#newInstance} factory method to + * create an instance of this fragment. + */ +public class DebugMenuFileManagerTesterFragment extends Fragment { + + // TODO: Rename parameter arguments, choose names that match + // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER + private static final String ARG_PARAM1 = "param1"; + private static final String ARG_PARAM2 = "param2"; + + // TODO: Rename and change types of parameters + private String mParam1; + private String mParam2; + + public DebugMenuFileManagerTesterFragment() { + // Required empty public constructor + } + + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param param1 Parameter 1. + * @param param2 Parameter 2. + * @return A new instance of fragment DebugMenuFileManagerTesterFragment. + */ + // TODO: Rename and change types and number of parameters + public static DebugMenuFileManagerTesterFragment newInstance(String param1, String param2) { + DebugMenuFileManagerTesterFragment fragment = new DebugMenuFileManagerTesterFragment(); + Bundle args = new Bundle(); + args.putString(ARG_PARAM1, param1); + args.putString(ARG_PARAM2, param2); + fragment.setArguments(args); + return fragment; + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (getArguments() != null) { + mParam1 = getArguments().getString(ARG_PARAM1); + mParam2 = getArguments().getString(ARG_PARAM2); + } + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_debug_menu_file_manager_tester, container, false); + } +} \ No newline at end of file diff --git a/feature/debug/src/main/res/layout/fragment_debug_menu_file_manager_tester.xml b/feature/debug/src/main/res/layout/fragment_debug_menu_file_manager_tester.xml new file mode 100644 index 00000000..32297ca8 --- /dev/null +++ b/feature/debug/src/main/res/layout/fragment_debug_menu_file_manager_tester.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file From e723174b816296b6c6144aed88b6cad31fd2575b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 16:45:26 +0900 Subject: [PATCH 034/217] =?UTF-8?q?WIP=20=E3=83=AC=E3=82=A4=E3=82=A2?= =?UTF-8?q?=E3=82=A6=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ragment_debug_menu_file_manager_tester.xml | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/feature/debug/src/main/res/layout/fragment_debug_menu_file_manager_tester.xml b/feature/debug/src/main/res/layout/fragment_debug_menu_file_manager_tester.xml index 32297ca8..32eda755 100644 --- a/feature/debug/src/main/res/layout/fragment_debug_menu_file_manager_tester.xml +++ b/feature/debug/src/main/res/layout/fragment_debug_menu_file_manager_tester.xml @@ -1,14 +1,34 @@ - - - + android:orientation="vertical" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent"> - \ No newline at end of file + + +