Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d4daa09f
Kaydet (Commit)
d4daa09f
authored
Kas 26, 2014
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
java,wizards: remove unnecessary use of reflection
Change-Id: I44750fa6673c7b5e0a796b6e443028aa3a5e68fc
üst
c0d1f38f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
10 deletions
+19
-10
DatabaseObjectWizard.java
wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java
+7
-8
FormWizard.java
wizards/com/sun/star/wizards/form/FormWizard.java
+6
-1
QueryWizard.java
wizards/com/sun/star/wizards/query/QueryWizard.java
+6
-1
No files found.
wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java
Dosyayı görüntüle @
d4daa09f
...
...
@@ -31,8 +31,6 @@ import com.sun.star.wizards.common.Desktop;
import
com.sun.star.wizards.common.NamedValueCollection
;
import
com.sun.star.wizards.common.Properties
;
import
com.sun.star.wizards.ui.WizardDialog
;
import
java.lang.reflect.Constructor
;
import
java.lang.reflect.Method
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
...
...
@@ -89,7 +87,12 @@ public abstract class DatabaseObjectWizard extends WizardDialog
}
}
protected
static
void
executeWizardFromCommandLine
(
final
String
i_args
[],
final
String
i_className
)
public
interface
WizardFromCommandLineStarter
{
void
start
(
XMultiServiceFactory
factory
,
PropertyValue
[]
curproperties
);
}
protected
static
void
executeWizardFromCommandLine
(
final
String
i_args
[],
WizardFromCommandLineStarter
starter
)
{
final
String
settings
[]
=
new
String
[]
{
null
,
null
,
null
};
final
int
IDX_PIPE_NAME
=
0
;
...
...
@@ -156,11 +159,7 @@ public abstract class DatabaseObjectWizard extends WizardDialog
else
curproperties
[
0
]
=
Properties
.
createProperty
(
"DataSourceName"
,
settings
[
IDX_DSN
]
);
final
Class
wizardClass
=
Class
.
forName
(
i_className
);
final
Constructor
ctor
=
wizardClass
.
getConstructor
(
XMultiServiceFactory
.
class
,
PropertyValue
[].
class
);
final
Method
invokeMethod
=
wizardClass
.
getMethod
(
"start"
,
new
Class
[
0
]
);
final
Object
wizardInstance
=
ctor
.
newInstance
(
serviceFactory
,
curproperties
);
invokeMethod
.
invoke
(
wizardInstance
);
starter
.
start
(
serviceFactory
,
curproperties
);
}
}
catch
(
java
.
lang
.
Exception
jexception
)
...
...
wizards/com/sun/star/wizards/form/FormWizard.java
Dosyayı görüntüle @
d4daa09f
...
...
@@ -84,7 +84,12 @@ public class FormWizard extends DatabaseObjectWizard
public
static
void
main
(
String
i_args
[])
{
executeWizardFromCommandLine
(
i_args
,
FormWizard
.
class
.
getName
()
);
executeWizardFromCommandLine
(
i_args
,
new
WizardFromCommandLineStarter
()
{
public
void
start
(
XMultiServiceFactory
factory
,
PropertyValue
[]
curproperties
)
{
FormWizard
wizard
=
new
FormWizard
(
factory
,
curproperties
);
wizard
.
start
();
}
});
}
// @Override
...
...
wizards/com/sun/star/wizards/query/QueryWizard.java
Dosyayı görüntüle @
d4daa09f
...
...
@@ -79,7 +79,12 @@ public class QueryWizard extends DatabaseObjectWizard
public
static
void
main
(
String
i_args
[])
{
executeWizardFromCommandLine
(
i_args
,
QueryWizard
.
class
.
getName
()
);
executeWizardFromCommandLine
(
i_args
,
new
WizardFromCommandLineStarter
()
{
public
void
start
(
XMultiServiceFactory
factory
,
PropertyValue
[]
curproperties
)
{
QueryWizard
wizard
=
new
QueryWizard
(
factory
,
curproperties
);
wizard
.
start
();
}
});
}
public
final
XFrame
getFrame
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment