Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
f1d70fcd
Commit
f1d70fcd
authored
Oct 20, 2016
by
Devon Carew
Committed by
GitHub
Oct 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create intellij metadata from flutter create (#6429)
parent
e72e1744
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
4 deletions
+39
-4
create.dart
packages/flutter_tools/lib/src/commands/create.dart
+5
-2
template.dart
packages/flutter_tools/lib/src/template.dart
+8
-2
modules.xml.tmpl
...ges/flutter_tools/templates/create/.idea/modules.xml.tmpl
+8
-0
main_dart.xml.tmpl
...mplates/create/.idea/runConfigurations/main_dart.xml.tmpl
+6
-0
projectName.iml.tmpl
packages/flutter_tools/templates/create/projectName.iml.tmpl
+12
-0
No files found.
packages/flutter_tools/lib/src/commands/create.dart
View file @
f1d70fcd
...
...
@@ -168,8 +168,11 @@ Your main program file is lib/main.dart in the $relativePath directory.
templateContext
[
'withDriverTest'
]
=
renderDriverTest
;
Template
createTemplate
=
new
Template
.
fromName
(
'create'
);
fileCount
+=
createTemplate
.
render
(
new
Directory
(
dirPath
),
templateContext
,
overwriteExisting:
false
);
fileCount
+=
createTemplate
.
render
(
new
Directory
(
dirPath
),
templateContext
,
overwriteExisting:
false
,
projectName:
projectName
);
if
(
renderDriverTest
)
{
Template
driverTemplate
=
new
Template
.
fromName
(
'driver'
);
...
...
packages/flutter_tools/lib/src/template.dart
View file @
f1d70fcd
...
...
@@ -60,8 +60,12 @@ class Template {
Map
<
String
/* relative */
,
String
/* absolute source */
>
_templateFilePaths
;
int
render
(
Directory
destination
,
Map
<
String
,
dynamic
>
context
,
{
bool
overwriteExisting:
true
})
{
int
render
(
Directory
destination
,
Map
<
String
,
dynamic
>
context
,
{
bool
overwriteExisting:
true
,
String
projectName
})
{
destination
.
createSync
(
recursive:
true
);
int
fileCount
=
0
;
...
...
@@ -72,6 +76,8 @@ class Template {
.
join
(
destinationDirPath
,
relativeDestPath
)
.
replaceAll
(
_kCopyTemplateExtension
,
''
)
.
replaceAll
(
_kTemplateExtension
,
''
);
if
(
projectName
!=
null
)
finalDestinationPath
=
finalDestinationPath
.
replaceAll
(
'projectName'
,
projectName
);
File
finalDestinationFile
=
new
File
(
finalDestinationPath
);
String
relativePathForLogging
=
path
.
relative
(
finalDestinationFile
.
path
);
...
...
packages/flutter_tools/templates/create/.idea/modules.xml.tmpl
0 → 100644
View file @
f1d70fcd
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectModuleManager"
>
<modules>
<module
fileurl=
"file://$PROJECT_DIR$/{{projectName}}.iml"
filepath=
"$PROJECT_DIR$/{{projectName}}.iml"
/>
</modules>
</component>
</project>
packages/flutter_tools/templates/create/.idea/runConfigurations/main_dart.xml.tmpl
0 → 100644
View file @
f1d70fcd
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="main.dart" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/lib/main.dart" />
<method />
</configuration>
</component>
\ No newline at end of file
packages/flutter_tools/templates/create/projectName.iml.tmpl
0 → 100644
View file @
f1d70fcd
<?xml version="1.0" encoding="UTF-8"?>
<module
type=
"FLUTTER_MODULE_TYPE"
version=
"4"
>
<component
name=
"NewModuleRootManager"
inherit-compiler-output=
"true"
>
<exclude-output
/>
<content
url=
"file://$MODULE_DIR$"
>
<excludeFolder
url=
"file://$MODULE_DIR$/packages"
/>
</content>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"Dart SDK"
level=
"application"
/>
<orderEntry
type=
"library"
name=
"Dart Packages"
level=
"project"
/>
</component>
</module>
\ No newline at end of file
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