Perintah Cloud Shell Editor

Halaman ini mencantumkan direktif yang terkait dengan Cloud Shell Editor.

Buka file

<walkthrough-editor-open-file filePath="FILE_PATH">LINK_TEXT</walkthrough-editor-open-file>

Membuat link yang membuka file di disk Cloud Shell di editor.

Parameter

Parameter Jenis Deskripsi
filePath String Jalur file relatif terhadap ruang kerja yang terbuka di Cloud Shell.

Membuka file dengan teks yang dipilih

<walkthrough-editor-select-line filePath="FILE_PATH" startLine="START_LINE" endLine="END_LINE">LINK_TEXT</walkthrough-editor-select-line>

Membuat link yang membuka file di disk Cloud Shell di editor, dan memilih baris teks di dalamnya.

Parameter

Parameter Jenis Deskripsi
filePath String Jalur file relatif terhadap ruang kerja yang terbuka di Cloud Shell.
startLine Bilangan bulat Baris file tempat pilihan dimulai. Tidak seperti editor kode, jumlah baris dimulai dari 0.
endLine Bilangan bulat Baris file tempat pilihan berakhir. Pilihan berakhir di awal baris ini. Tidak seperti editor kode, jumlah baris dimulai dari 0.
startCharacterOffset Bilangan bulat Nomor karakter dalam startLine untuk memulai pemilihan.
endCharacterOffset Bilangan bulat Jumlah karakter setelah posisi endLine yang akan dipilih.

Membuka file dengan teks yang dipilih oleh ekspresi reguler

<walkthrough-editor-select-regex filePath="FILE_PATH" regex="REGEX">LINK_TEXT</walkthrough-editor-select-regex>

Membuat link yang membuka file di disk Cloud Shell di Cloud Shell Editor dan memilih teks dalam file berdasarkan ekspresi reguler. Hanya kecocokan pertama dalam file yang dipilih.

Parameter

Parameter Jenis Deskripsi
filePath String Jalur file relatif terhadap ruang kerja yang terbuka di Cloud Shell.
regex String Ekspresi reguler yang akan dicocokkan. Multi-baris aktif.

Pointer sorotan

<walkthrough-editor-spotlight spotlightId="SPOTLIGHT_ID">LINK_TEXT</walkthrough-editor-spotlight>
<walkthrough-editor-spotlight cssSelector="CSS_SELECTOR">LINK_TEXT</walkthrough-editor-spotlight>

Membuat link yang menandai elemen UI tertentu di editor.

Anda dapat menyoroti elemen di halaman dengan salah satu dari dua cara berikut:

ID
Dengan menggunakan parameter spotlightId, tentukan nilai properti spotlight-id elemen DOM untuk memilih elemen.
Pemilih CSS
Untuk elemen tanpa sorotan pengukuran, gunakan parameter cssSelector dengan pemilih CSS untuk memilih elemen.

Hanya salah satu parameter ini yang diperlukan. Jika keduanya diberikan, spotlightId akan digunakan.

Parameter

Parameter Jenis Deskripsi
spotlightId String ID sorotan elemen.
spotlightItem String Wajib diisi jika spotlightId ditetapkan ke navigator. Nilai yang diharapkan adalah jalur file relatif terhadap ruang kerja yang terbuka di Cloud Shell.

Parameter spotlightId hanya menerima nilai berikut:

ID Sorotan Elemen yang disoroti
Panel aktivitas
activity-bar-cloud-apis Ikon panel aktivitas Cloud API.
activity-bar-cloud-k8s Ikon panel aktivitas Cloud Kubernetes.
activity-bar-cloud-run Ikon panel aktivitas Cloud Run.
activity-bar-debug Ikon panel aktivitas Debug.
activity-bar-scm Ikon kolom aktivitas Source Control.
activity-bar-search Ikon kolom aktivitas Penelusuran.
Cloud Code
cloud-code-gke-explorer Cloud Code Kubernetes Explorer > Google Kubernetes Engine section.
cloud-code-k8s-explorer Cloud Code Kubernetes Explorer > bagian Kubernetes.
cloud-code-k8s-explorer-minikube Cloud Code Kubernetes Explorer > minikube cluster (jika ada).
cloud-code-logs-viewer-cluster Logs Viewer > Filter Cluster.
cloud-code-logs-viewer-container Pelihat log > Filter Container.
cloud-code-logs-viewer-deployment Logs Viewer > Filter Deployment.
cloud-code-logs-viewer-namespace Logs Viewer > Filter Namespace.
cloud-code-logs-viewer-pod Logs Viewer > Filter Pod.
cloud-code-logs-viewer-refresh Penampil log > Tombol Muat ulang.
cloud-code-logs-viewer-stream-toggle Logs Viewer > tombol Streaming.
cloud-code-new-app Akses cepat Cloud Code > New Application.
cloud-code-debug-on-k8s Akses cepat Cloud Code > Debug di Kubernetes.
cloud-code-run-on-k8s Akses cepat Cloud Code > Run on Kubernetes.
cloud-code-open-welcome-page Akses cepat Cloud Code > Open Welcome Page.
cloud-code-cloud-run-deploy Akses cepat Cloud Code > Deploy to Cloud Run.
cloud-code-run-on-cloud-run-emulator Akses cepat Cloud Code > Run on Cloud Run Emulator.
Menu
menu-edit Menu Edit.
menu-file Menu File.
menu-terminal Menu Terminal.
menu-terminal-new-terminal Menu Terminal > New Terminal.
Status bar
cloud-code-status-bar Tombol menu status bar Cloud Code.
minikube-status-bar Tombol menu status bar minikube.
Elemen lainnya
debug-configuration Menu dropdown konfigurasi > tampilan debug.
file-explorer File explorer.
navigator File di penjelajah file Cloud Code. Harus dipasangkan dengan parameter spotlightItem.
output Log Output.