Commit Graph

7 Commits

Author SHA1 Message Date
Michel Weststrate
ba5f067320 Fix circular imports and lint against them
Summary: When trying to refactor some components, did once again run into circular imports that cause the flipper startup sequence to fail. Added linting rules to make sure this is much less likely to happen in the future, and fixed all resulting errors

Reviewed By: nikoant

Differential Revision: D24390583

fbshipit-source-id: 9b20cf6a4d3555dc68f0069c2950dd7162b17e67
2020-10-20 03:24:47 -07:00
Dominik Wielgórski
6c7748238d Update 'open in ide' menu only if the path for a class is resolved
Summary: If myles is taking too long users might experience issues with multiple tabs open for 'open in diffusion' functionality. This diff addresses this problem by displaying 'open in ide' menu only if the path is already resolved.

Reviewed By: mweststrate

Differential Revision: D23242199

fbshipit-source-id: ffa698110d4c5e0c0e0686fbc56a7eea6b5782e6
2020-08-21 08:57:22 -07:00
Dominik Wielgórski
8aa29d00f2 Display Xcode for CK and Android Studio for Litho Components
Summary:
Detect the framework used for a given component and accordingly, display a proper IDE list.

[FB Only]
changelog: It is now possible to directly open CKComponents from the Layout inspect

Reviewed By: adityasharat

Differential Revision: D23158628

fbshipit-source-id: 305f10752c72eac001334f09bab29264e3e328a6
2020-08-17 10:20:53 -07:00
Dominik Wielgórski
7d0dd3c656 Implemented method to get CKComponent path
Summary:
Added corresponding method for CKComponents which handles two main cases:

- CKSomeComponent_Spec should have corresponding CKSomeComponentSpec.mm

- CKSomeComponent should have corresponding CKSomeComponent.mm

Reviewed By: cuva

Differential Revision: D23158626

fbshipit-source-id: 9d5645a70d838847696aced6bbc947a8c4383f0c
2020-08-17 10:20:53 -07:00
Dominik Wielgórski
26b54ece5a Add functionality to resolve Litho Components / Sections
Summary:
Few cases to consider:
- SomeComponent.* might correspond to SomeComponentSpec.java
- SomeComponent.* might correspond to SomeComponentSpec.kt
- SomeComponent.* might not have a corresponding Spec file
- SomeComponent.kt (if it's a KComponent) corresponds to SomeComponent.kt

Reviewed By: adityasharat

Differential Revision: D23100032

fbshipit-source-id: f0604f3d1061f0e15fa2f455bdddd4d07ac12305
2020-08-17 10:20:53 -07:00
Dominik Wielgórski
641d39cf94 Added extension to getBestPath API
Summary: Expand API by passing a default extension

Reviewed By: adityasharat

Differential Revision: D23078940

fbshipit-source-id: c9303add194e85deb174a8fc343e37b73f59d1c0
2020-08-17 10:20:53 -07:00
Anton Nikolaev
dcd1c08dea Expose IDEFileResolver from 'flipper' module to properly import it from 'layout' plugin (#1442)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1442

Layout plugin cannot be bundled as a standalone package because it imports a file from outside of its folder. This change exposes IDEFileResolver in a proper way so now it's possible to import it from 'flipper'.

Reviewed By: passy

Differential Revision: D22975515

fbshipit-source-id: 8af6d2ca1ceb8627a449e055c8773549dd681b7a
2020-08-06 04:54:14 -07:00