java icon indicating copy to clipboard operation
java copied to clipboard

Can't see the source code in IntelliJ IDEA(Client-java-api-15.0.1.jar)

Open keepgoong opened this issue 1 year ago • 5 comments
trafficstars

IntelliJ IDEA:2022.3.1 JDK 11.0 MAVEN 3.8.7:

<dependency>
  <groupId>io.kubernetes</groupId>
  <artifactId>client-java</artifactId>
  <version>15.0.1</version>
</dependency>

I can't see the source code in client-java-api-15.0.1.jar.But I can see the source code in client-java-15.0.1.jar. For example: watch corev1api

Here's what I've tried:

  • 1.Change the source before:client-java-api-15.0.1.jar change after:client-java-api-15.0.1-sources.jar but this change didn't work,it changes back automatically,still use Client-java-api-15.0.1.jar. image
  • 2.Change Maven setting. I chose the following options 屏幕截图 2023-12-06 232817 It will download source.jar and javadoc.jar,but it did't solve the problem.

How can I solve this problem? Maybe I should choose JDK 8?But part of my dependency requires JDK11...

keepgoong avatar Dec 06 '23 13:12 keepgoong

I don't know how source code viewing in Intellij is supposed to work, so not sure if this is a problem with our library or with Intellij.

Given that this is pretty low-priority, I don't think we'll be fixing this anytime soon, but if you figure it out and send a PR we'd be happy to review it.

brendandburns avatar Dec 06 '23 18:12 brendandburns

Thank you for your answer! I found that some source file I can open with the source.jar,some source file can't.It seems that some code does not exist in the source jar package. Could this be a problem? CoreV1Api.java and ApiClient.java are both in a package named client-java-api-15.0.1-sources.jar.But CoreV1Api.java can't be opened in client-java-api-15.0.1-sources.jar,ApiClient.java can be opend in client-java-api-15.0.1-sources.jar.Could it be because there is no CoreV1Api.java file in client-java-api-15.0.1-sources.jar? 屏幕截图 2023-12-10 201247 屏幕截图 2023-12-10 201235

keepgoong avatar Dec 10 '23 12:12 keepgoong

I faced the same issue today and resolved it by increasing the file size limit to 4MB in the Custom Properties in IntelliJ, as follows:

idea.max.intellisense.filesize=4000

It seems the default value of 3MB is insufficient for certain files, such as CoreV1Api.java

See https://www.jetbrains.com/help/objc/configuring-file-size-limit.html

piotom avatar Dec 19 '23 15:12 piotom

@piotom Thank you very much! This solves the problem perfectly! image

keepgoong avatar Dec 19 '23 15:12 keepgoong

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Mar 18 '24 15:03 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Apr 17 '24 16:04 k8s-triage-robot