-
Notifications
You must be signed in to change notification settings - Fork 0
Home
These are the following steps in order to let SMASH create issues into a Redmine Server.
- Create the required directories:
- export/gtt
- import/gtt
-
In
export/gttdirectory create the filegtt_export.dartand copy the contents of export/gtt_export.dart from the Hyakumori's gtt/main GitHub repository. -
Remove all the library import code and add the following code:
part of smash_import_export_plugins;
class GttExportPlugin extends AExportPlugin {
ProjectDb projectDb;
BuildContext context;
@override
void setContext(BuildContext context) {
this.context = context;
}
@override
Icon getIcon() {
return Icon(
MdiIcons.cloudLock,
color: SmashColors.mainDecorations,
);
}
@override
String getTitle() {
return "GTT";
}
@override
String getDescription() {
return IEL.of(context).exportWidget_exportToGTT;
}
@override
void setProjectDatabase(ProjectDb projectDb) {
this.projectDb = projectDb;
}
@override
Widget getExportPage() {
return GttExportWidget(
projectDb,
);
}
@override
Widget getSettingsPage() {
return GttSettings();
}
}
-
Change
final GeopaparazziProjectDb projectDb;intofinal ProjectDb projectDb;in GttExportWidget class. -
Comment out the following code in lines 576 - 581
/*if (noteUpdated) {
ProjectState projectState =
Provider.of<ProjectState>(context, listen: false);
projectState.reloadProject(context);
}*/
- Change all instances of
GeopaparazziProjectDbtoProjectDb.
-
In
import/gttdirectory create the filegtt_import.dartand copy the contents of import/gtt_import.dart from the Hyakumori's gtt/main GitHub repository. -
Remove all the library import code and add the following code:
part of smash_import_export_plugins;
class GttImportPlugin extends AImportPlugin {
ProjectDb projectDb;
BuildContext context;
@override
void setContext(BuildContext context) {
this.context = context;
}
@override
Icon getIcon() {
return Icon(
MdiIcons.cloudLock,
color: SmashColors.mainDecorations,
);
}
@override
String getTitle() {
return "GTT";
}
@override
String getDescription() {
return IEL.of(context).importWidget_importFromGTT;
}
@override
void setProjectDatabase(ProjectDb projectDb) {
this.projectDb = projectDb;
}
@override
Widget getImportPage() {
return GttImportWidget();
}
@override
Widget getSettingsPage() {
return GttSettings();
}
}
-
In the
utilsdirectory, create the filegtt_utilities.dartand copy the contents of gtt/gtt_utilities.dart from the Hyakumori's gtt/main GitHub repository. -
Remove all the library import code and add the following code:
part of smash_import_export_plugins;
- Copy the classes
GttSettingsandGttSettingsStatefrom the widgets/settings.dart of the Hyakumori's gtt/main GitHub repository and place it at the bottom portion of thegtt_utilities.dart
-
Open
plugins.dartand addGttImportPlugin(),toList<AImportPlugin> importPlugins. -
Add
GttExportPlugin(),toList<AExportPlugin> exportPlugins.
- Open
smash_import_export_plugins.dartand add the following:
import 'package:intl/intl.dart';
and
part 'com/hydrologis/smash/import_export_plugins/export/gtt/gtt_export.dart';
part 'com/hydrologis/smash/import_export_plugins/import/gtt/gtt_import.dart';
part 'com/hydrologis/smash/import_export_plugins/utils/gtt_utilities.dart';
-
Change all instances of
SLintoIELfor gtt_import.dart, gtt_export.dart, and gtt_utilities.dart. -
Copy all
gttExport_*from Hyakumori's intl_en.arb GitHub repository and place into i10n/intl_en.arb -
Copy all
gttImport_*from Hyakumori's intl_en.arb GitHub repository and place into i10n/intl_en.arb -
Copy the following from Hyakumori's intl_en.arb GitHub repository and place into i10n/intl_en.arb:
- exportWidget_exportToGTT
- importWidget_importFromGeoTaskTracker
- settings_serverUsername
- settings_pleaseEnterValidUsername