Skip to content

Commit a211d4a

Browse files
committed
fix: rename files/folders to improve accessibility
1 parent 82b9fba commit a211d4a

14 files changed

+75
-54
lines changed

api/04-creating-node-extensions.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
---
2-
title: Node Integration with Extensions
2+
title: Use node.js from your extension
33
---
44

55
This document outlines how to create node extensions for **Phoenix Code**.
66

7-
## What are Node Extensions
7+
## What is a Node Extension?
88

9-
Node extensions for Phoenix Code enhance the desktop version by enabling Node.js capabilities and access to npm packages. Standard extensions run in both browser and desktop builds, but only desktop builds support Node.js execution. Browser builds do not support Node.js, so extensions must handle this limitation.
9+
Node Extensions in Phoenix Code bring the power of Node.js to your desktop development environment, unlocking access to the vast npm ecosystem for building feature-rich extensions. By leveraging Node.js runtime capabilities, these extensions can perform system-level operations like executing commands, accessing local files, or integrating with external applications – functionalities that aren't possible in traditional browser-based extensions.
10+
11+
One of the key advantages of Node Extensions is their ability to handle computationally intensive tasks without impacting the editor's performance. While browser-based extensions run in the main thread and can potentially freeze the UI during heavy processing, Node Extensions can offload these operations to separate processes. This makes them ideal for scenarios involving extensive image processing, code analysis, or other resource-demanding tasks. Whether you're building a system integration tool or implementing complex background processing, Node Extensions provide the perfect foundation for creating powerful, responsive extensions in Phoenix Code's desktop environment.
12+
For cross-platform compatibility between desktop and browser environments, you can alternatively use Web Workers to handle computation-intensive tasks. This approach requires bundling any npm dependencies using webpack or similar tools before they can run in the browser. Check out our [Web Worker Communication guide](https://docs.phcode.dev/api/API-Reference/worker/WorkerComm) for detailed instructions on implementing and managing Web Workers in your extension.
13+
14+
Important: When using Node Extensions for heavy computational tasks, make sure to fork a separate Node.js process or worker rather than running operations in the main Node.js process. This separation ensures optimal performance and stability of your extension within Phoenix Code.
1015

1116
## How to create a Node Extension
1217

Lines changed: 10 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
---
2-
title: Dialogs and Buttons
2+
title: Show Dialogs
3+
---
4+
5+
This document outlines the basic features of working with Dialogs, including:
6+
7+
* [How to add a Dialog Box with buttons](#adding-a-dialog-box-and-buttons)
8+
* [How to create custom Dialog Box](#creating-custom-dialog-boxes)
9+
* [How to handle the button clicks](#handle-button-clicks)
10+
311
---
412

513
## Adding a Dialog Box and Buttons
@@ -272,52 +280,4 @@ define(function (require, exports, module) {
272280

273281
Visual Reference
274282

275-
![Custom-dialog-box-gif](./images/custom-dialog-box-gif.gif)
276-
277-
278-
## Adding a button on Status Bar
279-
280-
1. Import the `StatusBar` module.
281-
282-
```jsx
283-
const StatusBar = brackets.getModule("widgets/StatusBar");
284-
```
285-
286-
287-
2. Register the command.
288-
289-
Register the command that will trigger the clicking.
290-
291-
```jsx
292-
var MY_COMMAND_ID = "helloworld_sayhello";
293-
CommandManager.register("Hello World", MY_COMMAND_ID, handleHelloWorld);
294-
```
295-
296-
297-
3. Add the button to the StatusBar.
298-
299-
To add the button to StatusBar, use `addIndicator()` :-
300-
301-
302-
```jsx
303-
StatusBar.addIndicator(
304-
MY_COMMAND_ID, // unique ID for this indicator
305-
$("<div>Test</div>").click(handleHelloWorld), // Optional DOMNode for the indicator
306-
true, // show the indicator
307-
"hello-world-status", // CSS class
308-
"tooltip", // tooltip text
309-
);
310-
```
311-
312-
→ The parameters of the `addIndicator()` method :-
313-
314-
| Param | Type | Description |
315-
| --- | --- | --- |
316-
| id | `string` | Registration id of the indicator to be updated. |
317-
| [indicator] | `DOMNode` or `jQueryObject` | Optional DOMNode for the indicator |
318-
| [visible] | `boolean` | Shows or hides the indicator over the statusbar. |
319-
| [style] | `string` | Sets the attribute "class" of the indicator. |
320-
| [tooltip] | `string` | Sets the attribute "title" of the indicator. |
321-
| [insertBefore] | `string` | An id of an existing status bar indicator. The new indicator will be inserted before (i.e. to the left of) the indicator specified by this parameter. |
322-
323-
> For a detailed description, refer to [this link](https://docs.phcode.dev/api/API-Reference/widgets/StatusBar).
283+
![Custom-dialog-box-gif](./images/custom-dialog-box-gif.gif)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Menus
2+
title: Add Menus, Menu items and Keyboard Shortcuts
33
---
44

55
This document outlines the basic features of working with Menus, including:

api/07-How-To/StatusBar.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: Add an indicator icon on the status bar
3+
---
4+
5+
This document outlines the basic features of working with Status Bar, including:
6+
7+
* [How to add a button on Status Bar](#adding-a-button-on-status-bar)
8+
9+
---
10+
11+
## Adding a button on Status Bar
12+
13+
1. Import the `StatusBar` module.
14+
15+
```jsx
16+
const StatusBar = brackets.getModule("widgets/StatusBar");
17+
```
18+
19+
20+
2. Register the command.
21+
22+
Register the command that will trigger the clicking.
23+
24+
```jsx
25+
var MY_COMMAND_ID = "helloworld_sayhello";
26+
CommandManager.register("Hello World", MY_COMMAND_ID, handleHelloWorld);
27+
```
28+
29+
30+
3. Add the button to the StatusBar.
31+
32+
To add the button to StatusBar, use `addIndicator()` :-
33+
34+
35+
```jsx
36+
StatusBar.addIndicator(
37+
MY_COMMAND_ID, // unique ID for this indicator
38+
$("<div>Test</div>").click(handleHelloWorld), // Optional DOMNode for the indicator
39+
true, // show the indicator
40+
"hello-world-status", // CSS class
41+
"tooltip", // tooltip text
42+
);
43+
```
44+
45+
→ The parameters of the `addIndicator()` method :-
46+
47+
| Param | Type | Description |
48+
| --- | --- | --- |
49+
| id | `string` | Registration id of the indicator to be updated. |
50+
| [indicator] | `DOMNode` or `jQueryObject` | Optional DOMNode for the indicator |
51+
| [visible] | `boolean` | Shows or hides the indicator over the statusbar. |
52+
| [style] | `string` | Sets the attribute "class" of the indicator. |
53+
| [tooltip] | `string` | Sets the attribute "title" of the indicator. |
54+
| [insertBefore] | `string` | An id of an existing status bar indicator. The new indicator will be inserted before (i.e. to the left of) the indicator specified by this parameter. |
55+
56+
> For a detailed description, refer to [this link](https://docs.phcode.dev/api/API-Reference/widgets/StatusBar).
File renamed without changes.

api/07-Extension-Quick-Start/images/custom-dialog-box-gif.gif renamed to api/07-How-To/images/custom-dialog-box-gif.gif

File renamed without changes.
File renamed without changes.
File renamed without changes.

api/07-Extension-Quick-Start/images/menu-item-before-after.png renamed to api/07-How-To/images/menu-item-before-after.png

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)